HHH-16966 Test reproducing the issue
This commit is contained in:
parent
bde1034aee
commit
87096e5a0a
|
@ -56,9 +56,11 @@ public class BatchEntityWithDisabledProxyTest {
|
|||
|
||||
cheese1.setBestCheese( cheese1 );
|
||||
cheese2.setBestCheese( cheese1 );
|
||||
cheese3.setBestCheese( cheese1 );
|
||||
|
||||
cheese1.setReplacement( cheese2 );
|
||||
cheese2.setReplacement( cheese1 );
|
||||
cheese3.setReplacement( cheese1 );
|
||||
|
||||
scope.inTransaction( s -> {
|
||||
s.persist( cheese1 );
|
||||
|
@ -95,6 +97,17 @@ public class BatchEntityWithDisabledProxyTest {
|
|||
} );
|
||||
}
|
||||
|
||||
@Test
|
||||
@JiraKey("HHH-16966")
|
||||
public void testGetReference(SessionFactoryScope scope) {
|
||||
scope.inSession( s -> {
|
||||
s.getSessionFactory().getCache().evictAllRegions();
|
||||
|
||||
Product product = s.getReference( Product.class, 3 );
|
||||
assertTrue( Hibernate.isInitialized(product) );
|
||||
} );
|
||||
}
|
||||
|
||||
@Entity(name = "Order")
|
||||
@Table(name = "ORDER_TABLE")
|
||||
public static class Order {
|
||||
|
|
Loading…
Reference in New Issue