Hi and thank you for this addition to mapstruct. We have some requirements, where we need to map a proto to a Java DTO, which is then sent via a rest api. And that Object has some required fields, so even, if a nested proto field does not exist I still want it to be mapped. So I want this if check to be removed:
if ( from.hasxxx() ) {
...
}
Right now, I only managed this by turning the mapper interface into an abstract class and then having and @AfterMapping method. Is there some other way, an option or anything, so I do not have to use aftermapping?
Hi and thank you for this addition to mapstruct. We have some requirements, where we need to map a proto to a Java DTO, which is then sent via a rest api. And that Object has some required fields, so even, if a nested proto field does not exist I still want it to be mapped. So I want this if check to be removed:
Right now, I only managed this by turning the mapper interface into an abstract class and then having and @AfterMapping method. Is there some other way, an option or anything, so I do not have to use aftermapping?