diff --git a/jOOQ-meta/src/main/java/org/jooq/util/AbstractDatabase.java b/jOOQ-meta/src/main/java/org/jooq/util/AbstractDatabase.java index 1b9777b882..1ef99f3884 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/AbstractDatabase.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/AbstractDatabase.java @@ -657,6 +657,7 @@ public abstract class AbstractDatabase implements Database { @Override public final ForcedType getConfiguredForcedType(Definition definition, DataTypeDefinition definedType) { + forcedTypeLoop: for (ForcedType forcedType : getConfiguredForcedTypes()) { String expression = forcedType.getExpression(); @@ -666,19 +667,18 @@ public abstract class AbstractDatabase implements Database { } String types = forcedType.getTypes(); - boolean match = true; - if (expression != null && !definition.getQualifiedName().matches(expression)) { - match = false; + if (expression != null + && !definition.getName().matches(expression) + && !definition.getQualifiedName().matches(expression)) { + continue forcedTypeLoop; } if (types != null && definedType != null && !definedType.getType().matches(types)) { - match = false; + continue forcedTypeLoop; } - if (match) { - return forcedType; - } + return forcedType; } return null; diff --git a/jOOQ-test/pom.xml b/jOOQ-test/pom.xml index 41759274b1..ba3c0a5a50 100644 --- a/jOOQ-test/pom.xml +++ b/jOOQ-test/pom.xml @@ -1269,31 +1269,31 @@ org.jooq.test.all.converters.Boolean_YES_NO_LC - (?i:(.*?.)?T_BOOLEANS.YES_NO_LC) + (?i:YES_NO_LC) org.jooq.test.all.converters.Boolean_YES_NO_UC - (?i:(.*?.)?T_BOOLEANS.YES_NO_UC) + (?i:YES_NO_UC) org.jooq.test.all.converters.Boolean_YN_LC - (?i:(.*?.)?T_BOOLEANS.Y_N_LC) + (?i:Y_N_LC) org.jooq.test.all.converters.Boolean_YN_UC - (?i:(.*?.)?T_BOOLEANS.Y_N_UC) + (?i:Y_N_UC) org.jooq.test.all.converters.Boolean_TF_LC - (?i:(.*?.)?T_BOOLEANS.TRUE_FALSE_LC) + (?i:TRUE_FALSE_LC) org.jooq.test.all.converters.Boolean_TF_UC - (?i:(.*?.)?T_BOOLEANS.TRUE_FALSE_UC) + (?i:TRUE_FALSE_UC) org.jooq.test.all.converters.Boolean_10 - (?i:(.*?.)?T_BOOLEANS.ONE_ZERO) + (?i:ONE_ZERO)