diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java index 9b7168d4b..6bf715d08 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java @@ -2303,8 +2303,8 @@ public class DBDictionary FilterValue rhs) { boolean castlhs = false; boolean castrhs = false; - Class lc = lhs.getType(); - Class rc = rhs.getType(); + Class lc = Filters.wrap(lhs.getType()); + Class rc = Filters.wrap(rhs.getType()); int type = 0; if (requiresCastForMathFunctions && (lc != rc || (lhs.isConstant() && rhs.isConstant()))) { @@ -2355,8 +2355,8 @@ public class DBDictionary FilterValue rhs) { boolean castlhs = false; boolean castrhs = false; - Class lc = lhs.getType(); - Class rc = rhs.getType(); + Class lc = Filters.wrap(lhs.getType()); + Class rc = Filters.wrap(rhs.getType()); int type = 0; if (requiresCastForComparisons && (lc != rc || (lhs.isConstant() && rhs.isConstant()))) {