Last active
August 29, 2015 14:23
-
-
Save manuelbernhardt/531261f954afc4342536 to your computer and use it in GitHub Desktop.
DefaultDataType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java b/jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java | |
index 5231af3..fd19cce 100644 | |
--- a/jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java | |
+++ b/jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java | |
@@ -720,6 +717,15 @@ public class DefaultDataType<T> implements DataType<T> { | |
if (dialect != null) { | |
result = TYPES_BY_TYPE[dialect.family().ordinal()].get(type); | |
+ | |
+ // check if we know about interfaces implemented by the type | |
+ if (result == null) { | |
+ for (Map.Entry<Class<?>, DataType<?>> knownType : TYPES_BY_TYPE[dialect.family().ordinal()].entrySet()) { | |
+ if(knownType.getKey().isAssignableFrom(type)) { | |
+ result = knownType.getValue(); | |
+ } | |
+ } | |
+ } | |
} | |
if (result == null) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment