Skip to content

Commit e08b137

Browse files
committed
#236: Add a test for mapping composition using the @mappings wrapper annotation
1 parent dd13840 commit e08b137

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

testData/bugs/_236/DisableSourceAndTargetPropertyInspectionOnAnnotations.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,19 @@
88
import java.lang.annotation.RetentionPolicy;
99

1010
import org.mapstruct.Mapping;
11+
import org.mapstruct.Mappings;
1112

1213
@Retention(RetentionPolicy.CLASS)
1314
@Mapping(target = "id", ignore = true)
1415
@Mapping(target = "creationDate", expression = "java(new java.util.Date())")
1516
@Mapping(target = "name", source = "groupName")
16-
@interface ToEntity { }
17+
@interface ToEntity { }
18+
19+
@Retention(RetentionPolicy.CLASS)
20+
@Mappings({
21+
@Mapping(target = "id", ignore = true),
22+
@Mapping(target = "creationDate", expression = "java(new java.util.Date())"),
23+
@Mapping(target = "name", source = "groupName")
24+
})
25+
@interface ToEntityWithMappings { }
26+

0 commit comments

Comments
 (0)