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
However above use case fails with the error: "RMG061: The referenced mapping named MapDocuments was not found"
Describe the solution you'd like MapProperty should allow us to use void methods that require the existing object.
Additonally:
In my specific case above I am using collection types. Initially I expected the MapDocuments method to be automaticly used as a UserMapping, without actually declaring MapProperty, but it never used my method, even when using the classic signature: ICollection<Document > Map(DocumentDto[] dtos) {...}
Additional context
Not sure if it's a feature or bug.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
According to the docs I can define user mapping function allowing me to use the existing object: https://mapperly.riok.app/docs/configuration/existing-target/
E.g. in my case I tried this:
Then the
MapProperty
attribute allows us to define a custom mapper function like:However above use case fails with the error: "RMG061: The referenced mapping named MapDocuments was not found"
Describe the solution you'd like
MapProperty
should allow us to use void methods that require the existing object.Additonally:
In my specific case above I am using collection types. Initially I expected the
MapDocuments
method to be automaticly used as a UserMapping, without actually declaringMapProperty
, but it never used my method, even when using the classic signature:ICollection<Document > Map(DocumentDto[] dtos) {...}
Additional context
Not sure if it's a feature or bug.
The text was updated successfully, but these errors were encountered: