wrap types before deciding whether or not a cast is needed.

git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@449322 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Patrick Linskey 2006-09-23 22:48:14 +00:00
parent aa6309af35
commit ce937180b4
1 changed files with 4 additions and 4 deletions

View File

@ -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()))) {