User implemented mapping method not taken into consideration #1025
Replies: 1 comment
-
Thank you for bringing this up, looks like a bug in Mapperly. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using Mapperly to map objects used in gRPC contracts to domain objects. The protobuf entities are compiled into POCO object via protoc during application build.
When having an array of strings in the contract that has a list of Guid as the source, Mapperly does not seem to take into consideration the custom method inside the mapper class that maps a Guid to a string. In the generated mapper
Guid.ToString()
is called.Using Mapperly 3.3.1-next.1 and .NET 8.
Proto:
Mapper:
Note: The presence of
MapSpecialArray
has no effect eitherI've never had such problems until now, I suspect the problem is that the target type is source generated and user code.
Note 2: If I create a class which has a
RepeatedField<string>
property mappings work just fine.Here is a repo to repro the issue: https://github.com/AndreiLacatos/GrpcSample
What am I missing here? How could I make it work?
Beta Was this translation helpful? Give feedback.
All reactions