From 6637fb08ecf6d07906e336ec55d1b22b9b87d9a5 Mon Sep 17 00:00:00 2001 From: Gail Badner Date: Tue, 21 Feb 2017 15:42:22 -0800 Subject: [PATCH] HHH-10537 : Fix test case to work pre-5.2 --- .../test/hql/CollectionMapWithComponentValueTest.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hibernate-core/src/test/java/org/hibernate/test/hql/CollectionMapWithComponentValueTest.java b/hibernate-core/src/test/java/org/hibernate/test/hql/CollectionMapWithComponentValueTest.java index 9ee314bbc7..51c3459615 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/hql/CollectionMapWithComponentValueTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/hql/CollectionMapWithComponentValueTest.java @@ -216,11 +216,15 @@ public class CollectionMapWithComponentValueTest extends BaseCoreFunctionalTestC @Test @TestForIssue(jiraKey = "HHH-10537") public void testLeftJoinMapAndUseKeyExpression() { - doInHibernate( this::sessionFactory, s -> { + Session s = openSession(); + s.getTransaction().begin(); + { // Assert that a left join is used for joining the map key entity table List keyValues= s.createQuery( "select key(v) from BaseTestEntity bte left join bte.entities te left join te.values v" ).list(); assertEquals( 2, keyValues.size() ); - } ); + } + s.getTransaction().commit(); + s.close(); } @Override