Answers for "mapstruct beam mapping for list of maps"

0

mapstruct beam mapping for list of maps

@Mapper
public interface MyMapper {

    @Mapping(target = "targetId", source = "sourceId")
    @Mapping(target = "subjectName", source = "course.courseName")
    @Mapping(target = "members", source = "course.students")
    Target map(Source source);

    @Mapping(target = "memberName", source = "studentName")
    Member toMember(Student student);
}
Posted by: Guest on May-06-2020

Browse Popular Code Answers by Language