Author: stliu
Date: 2009-12-30 10:36:46 -0500 (Wed, 30 Dec 2009)
New Revision: 18369
Modified:
search/branches/v3_1_1_GA_CP/src/test/java/org/hibernate/search/test/engine/LazyCollectionsUpdatingTest.java
Log:
JBPAPP-3316 org.hibernate.search.test.engine.LazyCollectionsUpdatingTest fails on most DB
by a NPE
Modified:
search/branches/v3_1_1_GA_CP/src/test/java/org/hibernate/search/test/engine/LazyCollectionsUpdatingTest.java
===================================================================
---
search/branches/v3_1_1_GA_CP/src/test/java/org/hibernate/search/test/engine/LazyCollectionsUpdatingTest.java 2009-12-30
11:59:12 UTC (rev 18368)
+++
search/branches/v3_1_1_GA_CP/src/test/java/org/hibernate/search/test/engine/LazyCollectionsUpdatingTest.java 2009-12-30
15:36:46 UTC (rev 18369)
@@ -28,7 +28,10 @@
FullTextSession fullTextSession = Search.getFullTextSession( sessions.openSession() );
try {
Transaction tx = fullTextSession.beginTransaction();
- BusStop busStop = (BusStop) fullTextSession.get( BusStop.class, 1L );
+ List list = fullTextSession.createCriteria( BusStop.class ).list();
+ assertNotNull( list );
+ assertEquals( 4 , list.size() );
+ BusStop busStop = (BusStop) list.get( 1 );
busStop.setRoadName( "new road" );
tx.commit();
}
@@ -45,7 +48,10 @@
assertFindsByRoadName( "buonarroti" );
FullTextSession fullTextSession = Search.getFullTextSession( sessions.openSession() );
try {
- BusStop busStop = (BusStop) fullTextSession.get( BusStop.class, 1L );
+ List list = fullTextSession.createCriteria( BusStop.class ).list();
+ assertNotNull( list );
+ assertEquals( 4 , list.size() );
+ BusStop busStop = (BusStop) list.get( 1 );
busStop.setRoadName( "new road" );
fullTextSession.flush();
}
Show replies by date