public class Employee {
private String id;
private String name;
private Department department
}
public class Department {
private String id;
private String name;
}
And the mapper
@Mapper
public interface MapToBeanMapper {
@Mapping(target = "department.id", source = "did")
@Mapping(target = "department.name", source = "dname")
Employee fromMap(Map<String, String> map);
}
Will not generate the correct code.
And the mapper
Will not generate the correct code.