Skip to content

Commit 712fb95

Browse files
stliusebersole
authored andcommitted
HHH-8276 fixing FooBarTest.testRefresh
1 parent aaadcd7 commit 712fb95

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

hibernate-core/src/main/java/org/hibernate/loader/entity/plan/LegacyBatchingEntityLoaderBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public Object load(Serializable id, Object optionalObject, SessionImplementor se
127127
return getObjectFromList( results, id, session );
128128
}
129129
}
130-
return ( loaders[batchSizes.length-1] ).load( id, optionalObject, session );
130+
return ( loaders[batchSizes.length-1] ).load( id, optionalObject, session, lockOptions );
131131
}
132132
}
133133

hibernate-core/src/test/java/org/hibernate/test/legacy/FooBarTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4311,11 +4311,11 @@ public void execute(Connection connection) throws SQLException {
43114311
}
43124312
);
43134313
s.refresh(foo);
4314-
assertTrue( foo.getLong().longValue() == -3l );
4315-
assertTrue( s.getCurrentLockMode(foo)==LockMode.READ );
4314+
assertEquals( Long.valueOf( -3l ), foo.getLong() );
4315+
assertEquals( LockMode.READ, s.getCurrentLockMode(foo) );
43164316
s.refresh(foo, LockMode.UPGRADE);
43174317
if ( getDialect().supportsOuterJoinForUpdate() ) {
4318-
assertTrue( s.getCurrentLockMode(foo)==LockMode.UPGRADE );
4318+
assertEquals( LockMode.UPGRADE, s.getCurrentLockMode(foo) );
43194319
}
43204320
s.delete(foo);
43214321
s.getTransaction().commit();
@@ -4329,7 +4329,7 @@ public void testAutoFlush() throws Exception {
43294329
FooProxy foo = new Foo();
43304330
s.save(foo);
43314331
assertTrue( "autoflush create", s.createQuery( "from Foo foo" ).list().size()==1 );
4332-
foo.setChar( new Character('X') );
4332+
foo.setChar( 'X' );
43334333
assertTrue( "autoflush update", s.createQuery( "from Foo foo where foo.char='X'" ).list().size()==1 );
43344334
txn.commit();
43354335
s.close();

0 commit comments

Comments
 (0)