Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
DefaultDataType.java
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
You can’t perform that action at this time.