mirror of https://github.com/apache/openjpa.git
Changed SQL generated by JPQL query "null = null" from "NULL IS NULL" to "1 = 1", since some databases (e.g., DB2) dislike "NULL IS NULL", but everyone is OK with "1 = 1".
git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@497276 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bb7bf59409
commit
f0be9e1af1
|
@ -36,7 +36,7 @@ class EqualExpression
|
|||
public void appendTo(Select sel, ExpContext ctx, BinaryOpExpState bstate,
|
||||
SQLBuffer buf, boolean val1Null, boolean val2Null) {
|
||||
if (val1Null && val2Null)
|
||||
buf.appendValue(null).append(" IS ").appendValue(null);
|
||||
buf.append("1 = 1");
|
||||
else if (val1Null || val2Null) {
|
||||
Val val = (val1Null) ? getValue2() : getValue1();
|
||||
ExpState state = (val1Null) ? bstate.state2 : bstate.state1;
|
||||
|
|
Loading…
Reference in New Issue