You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I see no way to prevent Mapperly from automatically generating mapping methods for nested properties and instead producing an error for a missing mapping.
Describe the solution you'd like
I'd like to see an ExplicitMappingRequired = true option in MapperAttribute which prevents this.
Ah my bad, I understand you now, I also just learned we don't provide a conversion for new instance mappings.
What you are trying to achieve is not supported by Mapperly yet...
Idea: Never build a conversion except there is a user-method requesting exactly that mapping.
Is your feature request related to a problem? Please describe.
I see no way to prevent Mapperly from automatically generating mapping methods for nested properties and instead producing an error for a missing mapping.
Describe the solution you'd like
I'd like to see an ExplicitMappingRequired = true option in MapperAttribute which prevents this.
Example:
Currently generated code:
Suggested change:
-> Mapperly fails with an error during compilation because B cannot be mapped to BTarget.
Describe alternatives you've considered
Other mappers like Mapster or AutoMapper which support this feature.
The text was updated successfully, but these errors were encountered: