diff options
author | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2022-03-17 23:26:35 +0100 |
---|---|---|
committer | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2022-03-17 23:26:35 +0100 |
commit | dbd4151e9ad85e41e4529aa6df4a5dd488336c43 (patch) | |
tree | a86295f967540fbef3e49ddb76d470293752cbb6 /website/templates/features | |
parent | e01bead93e43985d8a7bf6951d8e4c84b16ac7c5 (diff) | |
download | lombok-dbd4151e9ad85e41e4529aa6df4a5dd488336c43.tar.gz lombok-dbd4151e9ad85e41e4529aa6df4a5dd488336c43.tar.bz2 lombok-dbd4151e9ad85e41e4529aa6df4a5dd488336c43.zip |
[fixes #2991] Add documentation note on mixing mapstruct and fieldnameconstants in `@Mapping`.
Diffstat (limited to 'website/templates/features')
-rw-r--r-- | website/templates/features/experimental/FieldNameConstants.html | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/website/templates/features/experimental/FieldNameConstants.html b/website/templates/features/experimental/FieldNameConstants.html index 06fa23b5..cc147d51 100644 --- a/website/templates/features/experimental/FieldNameConstants.html +++ b/website/templates/features/experimental/FieldNameConstants.html @@ -58,6 +58,8 @@ Any parameters of lombok annotations that take strings need to be supplied actual string literals; you cannot have references to constants like those generated by <code>@FieldNameConstants</code>. If you'd like to use <code>@FieldNameConstants</code> to for example fill in the <code>of</code> and/or <code>exclude</code> parameters of <code>@ToString</code> and similar lombok annotations, use the <code>@ToString.Include</code> / <code>@ToString.Exclude</code> etc system instead; these are described at the feature pages for those features. </p><p> Like other lombok handlers that touch fields, any field whose name starts with a dollar (<code>$</code>) symbol is skipped entirely. Such a field will not be modified at all. Static fields are also skipped. + </p><p> + <em>MapStruct interop:</em> When making references to field name constants inside MapStruct's <code>@Mapping</code>, and you use that annotation more than once on a node, you must manually wrap these in the <code>@Mappings</code> 'container annotation'. Like so: <code>@Mappings({@Mapping(target = Entity.Fields.entityProperty, source = "dtoProperty")})</code>. </p> </@f.smallPrint> </@f.scaffold> |