[hibernate-commits] Hibernate SVN: r17995 - core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/hql.
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Tue Nov 17 04:07:29 EST 2009
Author: stliu
Date: 2009-11-17 04:07:29 -0500 (Tue, 17 Nov 2009)
New Revision: 17995
Modified:
core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/hql/ASTParserLoadingTest.java
Log:
JBPAPP-3056 Core - DB2 v9.1 - Test fails due to Invalid use of a parameter marker.
Modified: core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/hql/ASTParserLoadingTest.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/hql/ASTParserLoadingTest.java 2009-11-17 05:51:24 UTC (rev 17994)
+++ core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/hql/ASTParserLoadingTest.java 2009-11-17 09:07:29 UTC (rev 17995)
@@ -128,7 +128,12 @@
assertEquals( 1, results.size() );
results = s.createQuery( "from Human where name is not null" ).list();
assertEquals( 3, results.size() );
- s.createQuery( "from Human where ? is null" ).setParameter( 0, null ).list();
+ String query =
+ getDialect() instanceof DB2Dialect ?
+ "from Human where cast(? as string) is null" :
+ "from Human where ? is null"
+ ;
+ s.createQuery( query ).setParameter( 0, null ).list();
s.getTransaction().commit();
s.close();
More information about the hibernate-commits
mailing list