I'm stuck with mapping entity-> DTO. My model looks like :
public class UserDto extends AbDto {
private String login;
private String firstName;
private String lastName;
private String position;
private Set<RoleDto> roles;
}
public class RoleDto extends AbDto {
private String name;
private Set<PrivilegeDto> privileges;
private Set<RoleDto> users;
}
public class RoleDto extends AbDto {
private String name;
private Set<RoleDto> roles;
}
I use mapstruct for this, but I can't deal with the mapping. Is it a mistake at the modeling-level where trying to deal with two many-to-many relationships?