Hi,
I've got the following source:
class Source{
ClassA propA;
ClassB propB;
}
class Target{
List<ClassAB> list;
}
I'm trying to create 2 elements of ClassAB in list and map propA to 1st, propB to 2nd.
i tried:
public abstract ClassAB map1(ClassA value);
public abstract ClassAB map2(ClassB value);
void map1(ClassB prevValue, @MappingTarget List<ClassAB> list){
ClassAB type = map2(prevValue);
list.add(type);
}
void map2(ClassA value, @MappingTarget List<ClassAB> addresses){
ClassAB type = map2(prevValue);
list.add(type);
}
Getting errors when generating. I believe i've see somewhere that i can map multiple sources to one target but i can't find it in reference...
Thanks in advance for any suggestions :)
Anton