I have following class structure:
SOURCE
class c1 {
List<c11> o1;
}
class c11 {
List<c12> o2
}
TARGET
class c1 {
List<c11> o1;
}
class c11 {
c12 o2
}
Here is mapper class:
@Mapper
class MyMapper {
c12 map(List<c12> o);
}
I get error: Can't generate mapping method from iterable to non-iterable type.
Now to solve this i am doing this:
default c12 map(List<c12> o) {
return o.get(0);
}
even then i am getting this error
can't map property List<c12> o1[].o2 to List<c12> o1[].o2. consider to declare/implement a mapping methos: c12 map(List<c12> value)