Add sample of @Mapping annotation to @InheritInverseConfiguration

This commit is contained in:
sngrekov 2018-07-02 00:27:47 +03:00 committed by sjaakd
parent fc5f937a71
commit b03ca8b7a9

View File

@ -2235,7 +2235,7 @@ In case of bi-directional mappings, e.g. from entity to DTO and from DTO to enti
Use the annotation `@InheritInverseConfiguration` to indicate that a method shall inherit the inverse configuration of the corresponding reverse method.
.Inverse mapping method inheriting its configuration
.Inverse mapping method inheriting its configuration and ignoring some of them
====
[source, java, linenums]
[subs="verbatim,attributes"]
@ -2247,6 +2247,7 @@ public interface CarMapper {
CarDto carToDto(Car car);
@InheritInverseConfiguration
@Mapping(target = "numberOfSeats", ignore = true)
Car carDtoToCar(CarDto carDto);
}
----