smartstruct icon indicating copy to clipboard operation
smartstruct copied to clipboard

how to use other mapper as nested mapper

Open alimcomp opened this issue 2 years ago • 2 comments

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

alimcomp avatar Aug 29 '22 08:08 alimcomp

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.

smotastic avatar Oct 06 '22 17:10 smotastic

Any update/follow-up on this?

alaincruz06 avatar Dec 22 '23 21:12 alaincruz06