I need the possibility to define multiple sources for target mapping like it is possible in a single mapping rule. Or how can I achieve this mapping? The second map-Method should be automatically used by the first map-method, because ClassC can be constructed by ClassD & ClassE, which both are part of ClassA object hierarchy.
@Mappings({ @Mapping(source = ["inner.prop.d","inner.prop.e"], target = "c") }) ClassA map(ClassB b);
// ClassC contains props from ClassD & ClassE ClassC map(ClassD d, ClassE e);Sorry ClassD & ClassE are part of Input ClassB object
--
You received this message because you are subscribed to a topic in the Google Groups "mapstruct-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapstruct-users/1mNf7Ik0mL0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapstruct-use...@googlegroups.com.
To post to this group, send email to mapstru...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mapstruct-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstruct-use...@googlegroups.com.
AndreasThanks,Could you maybe open an issue for this on github? And maybe reference #73...I could imagine that whatever we come up there with would have some links to the feature you describe.Hi Gerrit,looks interesting! We had something related to this in mind already, tracked in https://github.com/mapstruct/mapstruct/issues/73 (for making use of one or more constructor-args).
2015-08-11 17:31 GMT+02:00 Gerrit Brehmer <g...r@gmail.com>:
Sorry ClassD & ClassE are part of Input ClassB object
Am 11.08.2015 17:16 schrieb "Gerrit Brehmer" <g...r@gmail.com>:
--I need the possibility to define multiple sources for target mapping like it is possible in a single mapping rule. Or how can I achieve this mapping? The second map-Method should be automatically used by the first map-method, because ClassC can be constructed by ClassD & ClassE, which both are part of ClassA object hierarchy.@Mappings({@Mapping(source = ["inner.prop.d","inner.prop.e"], target = "c") })ClassA map(ClassB b);
// ClassC contains props from ClassD & ClassEClassC map(ClassD d, ClassE e);
You received this message because you are subscribed to a topic in the Google Groups "mapstruct-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapstruct-users/1mNf7Ik0mL0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapstruct-users+unsubscribe@googlegroups.com.
To post to this group, send email to mapstruct-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mapstruct-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstruct-users+unsubscribe@googlegroups.com.
To post to this group, send email to mapstruct-users@googlegroups.com.
Could you maybe open an issue for this on github? And maybe reference #73...I could imagine that whatever we come up there with would have some links to the feature you describe.looks interesting! We had something related to this in mind already, tracked in https://github.com/mapstruct/mapstruct/issues/73 (for making use of one or more constructor-args).
For the time being, Java expressions may be a solution for you, see http://mapstruct.org/documentation/#section-expressions.