HHH-10537 : Fix test case to work pre-5.2

This commit is contained in:
Gail Badner 2017-02-21 15:42:22 -08:00
parent caa984327a
commit 6637fb08ec
1 changed files with 6 additions and 2 deletions

View File

@ -216,11 +216,15 @@ public class CollectionMapWithComponentValueTest extends BaseCoreFunctionalTestC
@Test @Test
@TestForIssue(jiraKey = "HHH-10537") @TestForIssue(jiraKey = "HHH-10537")
public void testLeftJoinMapAndUseKeyExpression() { 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 // 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(); 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() ); assertEquals( 2, keyValues.size() );
} ); }
s.getTransaction().commit();
s.close();
} }
@Override @Override