Relative Content

Tag Archive for javamapstruct

Mapstruct: mapping List with qualifiedByName

I’m trying to map a dto that contains a list of another dto, and call a method from another mapper for it. But I get the error “Ambiguous mapping methods found” even though I’m using the qualifiedByName parameter, and it should be obvious which method to use.

Mapstruct List to List: mapping element list position

I have to classes Source and Target, where Target has an additional field index, and I want to map a list of Source objects to a list of Target objects, where the index field is populated with the position of the corresponding Source object in the source list.