Search in sources :

Example 1 with OneToManyTableGroup

use of org.hibernate.sql.ast.tree.from.OneToManyTableGroup in project hibernate-orm by hibernate.

the class PluralAttributeMappingImpl method createOneToManyTableGroup.

private TableGroup createOneToManyTableGroup(boolean canUseInnerJoins, NavigablePath navigablePath, boolean fetched, String sourceAlias, SqlAliasBase sqlAliasBase, SqlExpressionResolver sqlExpressionResolver, FromClauseAccess fromClauseAccess, SqlAstCreationContext creationContext) {
    final TableGroup elementTableGroup = ((EntityCollectionPart) elementDescriptor).createTableGroupInternal(canUseInnerJoins, navigablePath.append(CollectionPart.Nature.ELEMENT.getName()), fetched, sourceAlias, sqlAliasBase, sqlExpressionResolver, creationContext);
    final OneToManyTableGroup tableGroup = new OneToManyTableGroup(this, elementTableGroup, creationContext.getSessionFactory());
    if (indexDescriptor instanceof TableGroupJoinProducer) {
        final TableGroupJoin tableGroupJoin = ((TableGroupJoinProducer) indexDescriptor).createTableGroupJoin(navigablePath.append(CollectionPart.Nature.INDEX.getName()), tableGroup, null, SqlAstJoinType.INNER, fetched, false, stem -> sqlAliasBase, sqlExpressionResolver, fromClauseAccess, creationContext);
        tableGroup.registerIndexTableGroup(tableGroupJoin);
    }
    return tableGroup;
}
Also used : TableGroupJoin(org.hibernate.sql.ast.tree.from.TableGroupJoin) OneToManyTableGroup(org.hibernate.sql.ast.tree.from.OneToManyTableGroup) CollectionTableGroup(org.hibernate.sql.ast.tree.from.CollectionTableGroup) OneToManyTableGroup(org.hibernate.sql.ast.tree.from.OneToManyTableGroup) TableGroup(org.hibernate.sql.ast.tree.from.TableGroup) TableGroupJoinProducer(org.hibernate.sql.ast.tree.from.TableGroupJoinProducer)

Aggregations

CollectionTableGroup (org.hibernate.sql.ast.tree.from.CollectionTableGroup)1 OneToManyTableGroup (org.hibernate.sql.ast.tree.from.OneToManyTableGroup)1 TableGroup (org.hibernate.sql.ast.tree.from.TableGroup)1 TableGroupJoin (org.hibernate.sql.ast.tree.from.TableGroupJoin)1 TableGroupJoinProducer (org.hibernate.sql.ast.tree.from.TableGroupJoinProducer)1