Open
Description
Example code:
@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE, componentModel = MappingConstants.ComponentModel.SPRING)
public interface VisitMapper {
@Mapping(source = "assignedVetId", target = "assignedVet.id")
@Mapping(source = "petId", target = "pet.id")
Visit toEntity(VisitDto visitDto);
@InheritInverseConfiguration(name = "toEntity")
VisitDto toDto(Visit visit);
}
The @InheritInverseConfiguration#name
is referencing a method in the same interface - toEntity()
.
Would be great to have auto completion and navigation.
Documentation:
https://mapstruct.org/documentation/stable/reference/html/#mapping-configuration-inheritance
https://mapstruct.org/documentation/stable/reference/html/#inverse-mappings