3 date: 2019-09-27T18:51:08+02:00
14 Controls which `@Generated` annotation members should be added to generated fields. Defaults to `WITHOUT_DATE` which uses all members except `date` in order to support reproducible builds (otherwise the generated classes would change on each generation).
16 ## Configuration Options
18 ### Option: 'WITHOUT_DATE'
20 The default value of the `fieldMembers` configuration option is `WITHOUT_DATE`. Setting the option to `WITHOUT_DATE` therefore produces the same code generated as the default configuration.
23 package com.example.persistence;
25 import javax.annotation.processing.Generated;
27 public class SomeRepository {
31 comments = "DO NOT MODIFY - automatically generated by YoSQL"
33 private Object someField;
35 // ... rest of generated code
42 Changing the `fieldMembers` configuration option to `ALL` outputs all annotation members.
45 package com.example.persistence;
47 import javax.annotation.processing.Generated;
49 public class SomeRepository {
53 date = "<current_timestamp>",
54 comments = "DO NOT MODIFY - automatically generated by YoSQL"
56 private Object someField;
58 // ... rest of generated code
65 Changing the `fieldMembers` configuration option to `NONE` outputs no annotation members.
68 package com.example.persistence;
70 import javax.annotation.processing.Generated;
72 public class SomeRepository {
75 private Object someField;
77 // ... rest of generated code
84 Changing the `fieldMembers` configuration option to `VALUE` outputs only the `value` member.
87 package com.example.persistence;
89 import javax.annotation.processing.Generated;
91 public class SomeRepository {
96 private Object someField;
98 // ... rest of generated code
105 Changing the `fieldMembers` configuration option to `DATE` outputs only the `date` member.
108 package com.example.persistence;
110 import javax.annotation.processing.Generated;
112 public class SomeRepository {
115 date = "<current_timestamp>"
117 private Object someField;
119 // ... rest of generated code
124 ### Option: 'COMMENT'
126 Changing the `fieldMembers` configuration option to `COMMENT` outputs only the `comment` member.
129 package com.example.persistence;
131 import javax.annotation.processing.Generated;
133 public class SomeRepository {
136 comments = "DO NOT MODIFY - automatically generated by YoSQL"
138 private Object someField;
140 // ... rest of generated code
147 - [annotateFields](../annotatefields/): Controls whether the `@Generated` annotation should be added at all.
148 - [fieldComment](../fieldcomment/): Controls the comment used in the `@Generated` annotation.
149 - [generatorName](../generatorname/): Controls the value used in the `@Generated` annotation.
155 In order to use `YoSQL` together with [Maven](https://maven.apache.org/), take a look at the tooling [documentation
156 for Maven](/tooling/maven/).
158 {{< maven/config/annotations/fieldMembers >}}
162 In order to use `YoSQL` together with [Gradle](https://gradle.org/), take a look at the tooling [documentation for Gradle](/tooling/gradle/).
166 id("wtf.metio.yosql")
178 In order to use `YoSQL` together with [Bazel](https://bazel.build/), take a look at the tooling [documentation for
179 Bazel](/tooling/bazel/).
183 In order to use YoSQL on the command line, take a look at the tooling [documentation for CLI](/tooling/cli/).
186 $ yosql --annotations-field-members=ALL
189 The shorter form is available as well:
192 $ yosql --field-members=ALL