From 23a04203590485259558a2c359b6143e69650f97 Mon Sep 17 00:00:00 2001 From: Sjaak Derksen Date: Tue, 13 Aug 2019 18:44:49 +0200 Subject: [PATCH] #1862 Update @MappingTarget documentation to take builders (#1864) --- .../src/main/asciidoc/mapstruct-reference-guide.asciidoc | 1 + 1 file changed, 1 insertion(+) diff --git a/documentation/src/main/asciidoc/mapstruct-reference-guide.asciidoc b/documentation/src/main/asciidoc/mapstruct-reference-guide.asciidoc index 2600d8265..fca680ae8 100644 --- a/documentation/src/main/asciidoc/mapstruct-reference-guide.asciidoc +++ b/documentation/src/main/asciidoc/mapstruct-reference-guide.asciidoc @@ -2711,6 +2711,7 @@ Within those groups, the method invocations are ordered by their location of def *Important:* the order of methods declared within one type can not be guaranteed, as it depends on the compiler and the processing environment implementation. +*Important:* when using a builder, the `@AfterMapping` annotated method must have the builder as `@MappingTarget` annotated parameter so that the method is able to modify the object going to be build. The `build` method is called when the `@AfterMapping` annotated method scope finishes. MapStruct will not call the `@AfterMapping` annotated method if the real target is used as `@MappingTarget` annotated parameter. [[using-spi]] == Using the MapStruct SPI