Search in sources :

Example 1 with SqmMapEntryReference

use of org.hibernate.query.sqm.tree.domain.SqmMapEntryReference in project hibernate-orm by hibernate.

the class SelectClauseTests method testMapEntryFunctionAssertions.

private void testMapEntryFunctionAssertions(SqmSelectStatement<?> statement) {
    assertEquals(1, statement.getQuerySpec().getSelectClause().getSelections().size());
    final SqmMapEntryReference mapEntryPath = (SqmMapEntryReference) statement.getQuerySpec().getSelectClause().getSelections().get(0).getSelectableNode();
    assertThat(mapEntryPath.getJavaTypeDescriptor().getJavaTypeClass(), is(equalTo(Map.Entry.class)));
    final SqmPath<?> selectedPathLhs = mapEntryPath.getMapPath();
    assertThat(selectedPathLhs.getExplicitAlias(), is("m"));
}
Also used : SqmMapEntryReference(org.hibernate.query.sqm.tree.domain.SqmMapEntryReference) Map(java.util.Map)

Aggregations

Map (java.util.Map)1 SqmMapEntryReference (org.hibernate.query.sqm.tree.domain.SqmMapEntryReference)1