openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Prud'hommeaux <mprud...@apache.org>
Subject Re: Bad Derby query
Date Tue, 03 Apr 2007 04:15:19 GMT
Dain-

> Also, I'm using 0.9.6 so is this a known problem?

I have a very hazy recollection of this being something that was  
fixed recently, but a quick search through JIRA doesn't reveal anything.

Could you try it out against the latest 0.9.7-incubating-SNAPSHOT and  
let us know if still happens?



On Apr 2, 2007, at 5:27 PM, Dain Sundstrom wrote:

> 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


Mime
View raw message