use of org.hibernate.sql.AliasGenerator in project hibernate-orm by hibernate.
the class MapEntryNode method determineValueSelectExpressions.
private void determineValueSelectExpressions(QueryableCollection collectionPersister, List selections) {
AliasGenerator aliasGenerator = new LocalAliasGenerator(1);
appendSelectExpressions(collectionPersister.getElementColumnNames(), selections, aliasGenerator);
Type valueType = collectionPersister.getElementType();
if (valueType.isAssociationType()) {
EntityType valueEntityType = (EntityType) valueType;
Queryable valueEntityPersister = (Queryable) sfi().getEntityPersister(valueEntityType.getAssociatedEntityName(sfi()));
SelectFragment fragment = valueEntityPersister.propertySelectFragmentFragment(elementTableAlias(), null, false);
appendSelectExpressions(fragment, selections, aliasGenerator);
}
}
use of org.hibernate.sql.AliasGenerator in project hibernate-orm by hibernate.
the class MapEntryNode method determineKeySelectExpressions.
private void determineKeySelectExpressions(QueryableCollection collectionPersister, List selections) {
AliasGenerator aliasGenerator = new LocalAliasGenerator(0);
appendSelectExpressions(collectionPersister.getIndexColumnNames(), selections, aliasGenerator);
Type keyType = collectionPersister.getIndexType();
if (keyType.isEntityType()) {
MapKeyEntityFromElement mapKeyEntityFromElement = findOrAddMapKeyEntityFromElement(collectionPersister);
Queryable keyEntityPersister = mapKeyEntityFromElement.getQueryable();
SelectFragment fragment = keyEntityPersister.propertySelectFragmentFragment(mapKeyEntityFromElement.getTableAlias(), null, false);
appendSelectExpressions(fragment, selections, aliasGenerator);
}
}
Aggregations