HHH-10577 : Fix test case to work pre-5.2
This commit is contained in:
parent
c27e51c3d7
commit
afee667c21
|
@ -153,12 +153,16 @@ public class CollectionMapWithComponentValueTest extends BaseCoreFunctionalTestC
|
|||
@Test
|
||||
@TestForIssue(jiraKey = "HHH-10577")
|
||||
public void testMapKeyExpressionDereferenceInSelect() {
|
||||
doInHibernate( this::sessionFactory, s -> {
|
||||
List<String> keyValueNames = s.createQuery( "select key(v).name as name from TestEntity te join te.values v order by name", String.class ).list();
|
||||
Session s = openSession();
|
||||
s.getTransaction().begin();
|
||||
{
|
||||
List keyValueNames = s.createQuery( "select key(v).name as name from TestEntity te join te.values v order by name" ).list();
|
||||
assertEquals( 2, keyValueNames.size() );
|
||||
assertEquals( "key1", keyValueNames.get( 0 ) );
|
||||
assertEquals( "key2", keyValueNames.get( 1 ) );
|
||||
} );
|
||||
}
|
||||
s.getTransaction().commit();
|
||||
s.close();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue