From b03ca8b7a9327a35a3bd3e89317b621458b220f7 Mon Sep 17 00:00:00 2001 From: sngrekov Date: Mon, 2 Jul 2018 00:27:47 +0300 Subject: [PATCH] Add sample of @Mapping annotation to @InheritInverseConfiguration --- .../src/main/asciidoc/mapstruct-reference-guide.asciidoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/documentation/src/main/asciidoc/mapstruct-reference-guide.asciidoc b/documentation/src/main/asciidoc/mapstruct-reference-guide.asciidoc index c39addf90..0647880e1 100644 --- a/documentation/src/main/asciidoc/mapstruct-reference-guide.asciidoc +++ b/documentation/src/main/asciidoc/mapstruct-reference-guide.asciidoc @@ -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); } ----