I have the following query:
SELECT a.alias FROM AliasBean AS a WHERE (a.alias IS NULL AND ?1 IS
NULL) OR a.alias = ?1
Which works great when run against HSQLDB. When I switch the
database to Derby I get the following exception:
<0|false|0.9.6-incubating>
org.apache.openjpa.persistence.PersistenceException: Syntax error:
Encountered "NULL" at line 1, column 68. {SELECT t0.ALIAS FROM
ALIASEJB_TABLE t0 WHERE (t0.ALIAS IS NULL AND NULL IS NULL OR
t0.ALIAS IS NULL)} [code=20000, state=42X01]
Now my code is setting the parameter to NULL but that should be
valid. Any idea what is going on? Also, I'm using 0.9.6 so is this
a known problem?
Thanks,
-dain