diff --git a/hibernate-core/src/test/java/org/hibernate/test/immutable/ImmutableTest.java b/hibernate-core/src/test/java/org/hibernate/test/immutable/ImmutableTest.java index a084dc1c1c..161010bbd9 100755 --- a/hibernate-core/src/test/java/org/hibernate/test/immutable/ImmutableTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/immutable/ImmutableTest.java @@ -91,7 +91,7 @@ public class ImmutableTest extends BaseCoreFunctionalTestCase { s -> { s.beginTransaction(); try { - Contract c = getContract( s ); + Contract c = s.load(Contract.class, contract.getId()); // Contract c = (Contract) s.createCriteria(Contract.class).uniqueResult(); assertTrue( s.isReadOnly( c ) ); assertEquals( c.getCustomerName(), "gavin" ); @@ -153,7 +153,7 @@ public class ImmutableTest extends BaseCoreFunctionalTestCase { inSession( s -> { - Contract c = getContract( s ); + Contract c = s.load( Contract.class, contract.getId() ); assertTrue( s.isReadOnly( c ) ); assertEquals( c.getCustomerName(), "gavin" ); assertEquals( c.getVariations().size(), 2 ); @@ -1218,7 +1218,7 @@ public class ImmutableTest extends BaseCoreFunctionalTestCase { inTransaction( s -> { - Contract c = getContract( s ); + Contract c = s.load( Contract.class, contract.getId() ); assertEquals( c.getCustomerName(), "gavin" ); assertEquals( c.getVariations().size(), 2 ); Iterator it = c.getVariations().iterator();