MapStruct set field value to a result of another mapper method
Given classes
Mapstruct: a particular case of shared mappings
In one mapper, I have this method
Set property without mapping in mapper Java Mapstruct
I have a mapper like:
Cat toAnotherCat(Cat origin);
And I need an another mapper like that (CatsHouse
has a property: Cat oneOfCats;
):
CatsHouse toNewCatsHouse(CatsHouse catsHouse)
mapstruct, nested classes avoid writing mapper for each nested class
I have source and target classes that look like this