Author: stliu
Date: 2009-11-25 03:01:22 -0500 (Wed, 25 Nov 2009)
New Revision: 18058
Modified:
core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/filter/DynamicFilterTest.java
Log:
JBPAPP-3098 HHH-4065 - correct this test, due to 1.4 does not support autobox
Modified:
core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/filter/DynamicFilterTest.java
===================================================================
---
core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/filter/DynamicFilterTest.java 2009-11-25
07:48:51 UTC (rev 18057)
+++
core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/filter/DynamicFilterTest.java 2009-11-25
08:01:22 UTC (rev 18058)
@@ -88,7 +88,7 @@
ts = ( ( SessionImplementor ) session ).getTimestamp();
session.enableFilter( "fulfilledOrders" ).setParameter( "asOfDate",
testData.lastMonth.getTime() );
sp = ( Salesperson ) session.createQuery( "from Salesperson as s where s.id =
:id" )
- .setLong( "id", testData.steveId )
+ .setLong( "id", testData.steveId.longValue() )
.uniqueResult();
assertEquals( "Filtered-collection not bypassing 2L-cache", 1,
sp.getOrders().size() );
@@ -196,7 +196,7 @@
assertEquals( "Incorrect order count", 1, ( ( Salesperson ) salespersons.get(
0 ) ).getOrders().size() );
List products = session.createCriteria( Product.class )
- .add( Restrictions.eq( "stockNumber", 124 ) )
+ .add( Restrictions.eq( "stockNumber", Integer.valueOf(124) ) )
.list();
assertEquals( "Incorrect product count", 1, products.size() );
@@ -605,7 +605,7 @@
// Force the categories to not get initialized here
List result = session.createQuery( "from Product as p where p.id = :id" )
- .setLong( "id", testData.prod1Id )
+ .setLong( "id", testData.prod1Id.longValue() )
.list();
assertTrue( "No products returned from HQL", !result.isEmpty() );