smartstruct
smartstruct copied to clipboard
how to use other mapper as nested mapper
Hi and thank you for work I have to use other mapper inside my mapper for mapping nested element of my model to entity But currently I have to copy same method from other mapper
Yes, currently there is no other way other than copying the method from the other mapper as you mentioned, unfortunately. But I think this is a good idea for a future feature. I am thinking just adding the dependend mapper as a constructor argument, and the generating mapper should be able to then inject the instance into his own mapper.
Only problems I see (or might happen) is that there is a dependency inbetween mappers now, so the order of generating mappers becomes important all of the sudden.
Any update/follow-up on this?