From f3df95de3e9bd89232fdaed4feb9ac8e1f9512a8 Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Sun, 30 Jun 2013 13:53:08 +0200 Subject: [PATCH] [#552] Fixed DefaultDataType's type lookup for casting --- jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java b/jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java index 70325aeba3..c24cf41d1f 100644 --- a/jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java +++ b/jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java @@ -365,7 +365,7 @@ public class DefaultDataType implements DataType { // Be sure to reset length, precision, and scale, as those values // were not registered in the below cache - DataType dataType = TYPES_BY_SQL_DATATYPE[configuration.dialect().ordinal()].get(length(0).precision(0, 0)); + DataType dataType = TYPES_BY_SQL_DATATYPE[configuration.dialect().family().ordinal()].get(length(0).precision(0, 0)); if (dataType != null) { return (DataType) dataType; @@ -373,7 +373,7 @@ public class DefaultDataType implements DataType { } // If this is already the dialect's specific data type, return this - else if (getDialect() == configuration.dialect()) { + else if (getDialect().family() == configuration.dialect().family()) { return this; }