diff --git a/jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java b/jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java index 1c91a1fc21..09f7d44aa1 100644 --- a/jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java +++ b/jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java @@ -461,7 +461,7 @@ public class DefaultDataType extends AbstractDataTypeX { // If this is a SQLDataType find the most suited dialect-specific // data type if (getDialect() == null) { - DefaultDataType dataType = TYPES_BY_SQL_DATATYPE[configuration.family().ordinal()] + DefaultDataType dataType = (DefaultDataType) TYPES_BY_SQL_DATATYPE[configuration.family().ordinal()] // Be sure to reset length, precision, and scale, as those // values were not registered in the below cache @@ -471,7 +471,7 @@ public class DefaultDataType extends AbstractDataTypeX { // ... and then, set them back to the original value // [#2710] TODO: Remove this logic along with cached data types - return (DataType) dataType.length0(length).precision0(precision, scale); + return dataType.construct(precision, scale, length, nullability, collation, characterSet, identity, defaultValue); } // If this is already the dialect's specific data type, return this