diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/NotEqualExpression.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/NotEqualExpression.java index 3cbab0154..a30ef3b6f 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/NotEqualExpression.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/NotEqualExpression.java @@ -36,7 +36,7 @@ class NotEqualExpression public void appendTo(Select sel, ExpContext ctx, BinaryOpExpState bstate, SQLBuffer buf, boolean val1Null, boolean val2Null) { if (val1Null && val2Null) - buf.appendValue(null).append(" IS NOT ").appendValue(null); + buf.append("1 <> 1"); else if (val1Null || val2Null) { Val val = (val1Null) ? getValue2() : getValue1(); ExpState state = (val1Null) ? bstate.state2 : bstate.state1;