[jOOQ/jOOQ#6492] Maintain readonly and generation info with forced types

This commit is contained in:
Lukas Eder 2021-12-10 11:29:17 +01:00
parent 82e774402f
commit 3cfa82ca34

View File

@ -247,6 +247,8 @@ public abstract class AbstractTypedElementDefinition<T extends Definition>
boolean n = result.isNullable();
String d = result.getDefaultValue();
boolean i = result.isIdentity();
boolean r = result.isReadonly();
String g = result.getGeneratedAlwaysAs();
int l = 0;
int p = 0;
@ -275,7 +277,7 @@ public abstract class AbstractTypedElementDefinition<T extends Definition>
if (customType != null)
log.warn("Custom type conflict", child + " has custom type " + customType + " forced by " + forcedType + " but a data type rewrite applies");
result = new DefaultDataTypeDefinition(db, child.getSchema(), uType, l, p, s, n, d, i, (Name) null, converter, binding, null);
result = new DefaultDataTypeDefinition(db, child.getSchema(), uType, l, p, s, n, r, g, d, i, (Name) null, converter, binding, null);
}
// Other forced types are UDT's, enums, etc.
@ -285,7 +287,7 @@ public abstract class AbstractTypedElementDefinition<T extends Definition>
s = result.getScale();
String t = result.getType();
Name u = result.getQualifiedUserType();
result = new DefaultDataTypeDefinition(db, definedType.getSchema(), t, l, p, s, n, d, i, u, converter, binding, uType);
result = new DefaultDataTypeDefinition(db, definedType.getSchema(), t, l, p, s, n, r, g, d, i, u, converter, binding, uType);
}
// [#4597] If we don't have a type-rewrite (forcedDataType) or a