@Mapper(
withCustomFields = {
@Field({"address.street","addressStreet"}),
@Field({"address.zipCode","addressZipCode"}),
@Field({"address.city","addressCity"}),
@Field({"address.country","addressCountry"})
}
)
public interface PersonMapper {
Person asModel( PersonDto personDto );
PersonDto asDto( Person person);
}
error: setter for field city from source bean org.gradle.Address is missing in destination bean org.gradle.AddressDto !
PersonDto asDto( Person person);
^
--> Add @Mapper(withIgnoreFields="org.gradle.Address.city") / @Maps(withIgnoreFields="org.gradle.Address.city") to mapper interface / method or add missing getter or specify corresponding @Field to customize field to field mapping
error: setter for field country from source bean org.gradle.Address is missing in destination bean org.gradle.AddressDto !
--> Add @Mapper(withIgnoreFields="org.gradle.Address.country") / @Maps(withIgnoreFields="org.gradle.Address.country") to mapper interface / method or add missing getter or specify corresponding @Field to customize field to field mapping
8 errors
However, if I remove either of the (main) address or the additional addresses, this works... The files are in the attached zip file.