I have a CXF generated class which has a collection as its only property. I need to map a single value from my DTO into an element of that collection, as in:
class DTO {
String dto;
}
class A {
String a;
}
class B {
List<A> b;
}
interface Mapper {
@Mappings({
@Mapping(source="dto", target="b.a")
})
B getBfromDTO(DTO dto);
}
Should this really work? If so, how could I configure this mapping?