[jOOQ/jOOQ#8353] Generated EmbeddableRecords must reference forced type

When an embeddable's base table has converted columns (via forced type), then the embeddable record must reflect the base table column's converted data types.
This commit is contained in:
Lukas Eder 2020-08-19 15:52:48 +02:00
parent b19246ace2
commit 80ed6c76d5
2 changed files with 17 additions and 4 deletions

View File

@ -125,18 +125,16 @@ public abstract class AbstractTypedElementDefinition<T extends Definition>
@Override
public DataTypeDefinition getType() {
if (type == null) {
if (type == null)
type = mapDefinedType(container, this, definedType, null);
}
return type;
}
@Override
public DataTypeDefinition getType(JavaTypeResolver resolver) {
if (resolvedType == null) {
if (resolvedType == null)
resolvedType = mapDefinedType(container, this, definedType, resolver);
}
return resolvedType;
}

View File

@ -63,4 +63,19 @@ public class DefaultEmbeddableColumnDefinition
public final ColumnDefinition getReferencingColumn() {
return referencingColumn;
}
@Override
public DataTypeDefinition getType() {
return getReferencingColumn().getType();
}
@Override
public DataTypeDefinition getType(JavaTypeResolver resolver) {
return getReferencingColumn().getType(resolver);
}
@Override
public DataTypeDefinition getDefinedType() {
return getReferencingColumn().getDefinedType();
}
}