[jOOQ/jOOQ#13319] Generated records shouldn't have a @ConstructorProperties annotation on their POJO constructor

This commit is contained in:
Lukas Eder 2022-03-22 08:56:25 +01:00
parent a8b4fa6231
commit 11dbdbb75e

View File

@ -2105,13 +2105,15 @@ public class JavaGenerator extends AbstractGenerator {
out.println("%sconstructor([[%s]]): this() {", visibility(), arguments);
}
else {
if (generateConstructorPropertiesAnnotationOnRecords())
out.println("@%s({ [[%s]] })", out.ref("java.beans.ConstructorProperties"), properties);
if (pojoArgument)
if (pojoArgument) {
out.println("%s%s(%s value) {", visibility(), className, out.ref(pojoNameFull));
else
}
else {
if (generateConstructorPropertiesAnnotationOnRecords())
out.println("@%s({ [[%s]] })", out.ref("java.beans.ConstructorProperties"), properties);
out.println("%s%s([[%s]]) {", visibility(), className, arguments);
}
if (tableUdtOrEmbeddable instanceof EmbeddableDefinition)
out.println("this();", tableIdentifier);