Author: jcosta(a)redhat.com
Date: 2009-04-21 09:45:48 -0400 (Tue, 21 Apr 2009)
New Revision: 16381
Modified:
entitymanager/branches/v3_4_0_GA_CP/src/test/org/hibernate/ejb/test/QueryTest.java
Log:
EJB-404 - Changed order and added cast to avoid problems with pgsql and db2. For branch
v3_4_0_GA_CP
Modified:
entitymanager/branches/v3_4_0_GA_CP/src/test/org/hibernate/ejb/test/QueryTest.java
===================================================================
---
entitymanager/branches/v3_4_0_GA_CP/src/test/org/hibernate/ejb/test/QueryTest.java 2009-04-21
13:39:04 UTC (rev 16380)
+++
entitymanager/branches/v3_4_0_GA_CP/src/test/org/hibernate/ejb/test/QueryTest.java 2009-04-21
13:45:48 UTC (rev 16381)
@@ -305,7 +305,7 @@
em.flush();
em.clear();
Query q = em.createQuery(
- "select i from Item i where (i.descr is null and :descr is null) or i.descr =
:descr"
+ "select i from Item i where i.descr = :descr or (i.descr is null and cast(:descr
as string) is null)"
);
//Query q = em.createQuery( "select i from Item i where (i.descr is null and
:descr is null) or (i.descr = :descr");
q.setParameter( "descr", "dd" );