TableReference for correlated roots.
Table group joins are pushed into the from clause as roots and join predicates to the where clause.
| Modifier and Type | Field and Description |
|---|---|
| private final TableGroup | |
| private final Consumer | |
| private final QuerySpec |
| Access | Constructor and Description |
|---|---|
| public | CorrelatedTableGroup(TableGroup correlatedTableGroup, SqlAliasBase sqlAliasBase, QuerySpec querySpec, Consumer<Predicate> joinPredicateConsumer, SessionFactoryImplementor sessionFactory)
Deprecated
as a consequence of
SessionFactoryImplementor being deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
| public void | addNestedTableGroupJoin(TableGroupJoin join)
Overrides org. Implements org.
select *
from entity1 e
left join (
collection_table c1
join association a on a.id = c1.target_id
) on c1.entity_id = e.id and c1.key = 1
is modeled as
TableGroup(
primaryTableReference = TableReference(entity1, e),
tableGroupJoins = [
TableGroupJoin(
TableGroup(
primaryTableReference = TableReference(collection_table, c1),
nestedTableGroupJoins = [
TableGroupJoin(
TableGroup(
primaryTableReference = TableReference(association, a)
)
)
]
)
)
]
)
This is necessary to correctly retain the cardinality of an HQL join like e.g.
from Entity1 e left join e.collectionAssociation c on key(c) = 1
|
| public void | |
| public void | applyAffectedTableNames(Consumer<String> nameCollector)
Implements org. |
| public TableGroup | findCompatibleJoinedGroup(TableGroupJoinProducer joinProducer, SqlAstJoinType requestedJoinType)
Overrides default org. |
| public TableGroup | |
| public Consumer | |
| public TableReference | |
| public TableReference | getTableReference(NavigablePath navigablePath, ValuedModelPart modelPart, String tableExpression, boolean resolve)
Overrides default org. |
| public TableReference | getTableReference(NavigablePath
The path for which to look up the table reference, may be null navigablePath, String The table expression for which to look up the table reference tableExpression, boolean Whether to potentially create table reference joins for this table group resolve)Overrides org. Implements org. |
| public List | |
| public void | prependTableGroupJoin(NavigablePath navigablePath, TableGroupJoin join)
Overrides org. Implements org. |
| private void |
| correlatedTableGroup | back to summary |
|---|---|
| private final TableGroup correlatedTableGroup | |
| joinPredicateConsumer | back to summary |
|---|---|
| private final Consumer<Predicate> joinPredicateConsumer | |
| querySpec | back to summary |
|---|---|
| private final QuerySpec querySpec | |
| CorrelatedTableGroup | back to summary |
|---|---|
| public CorrelatedTableGroup(TableGroup correlatedTableGroup, SqlAliasBase sqlAliasBase, QuerySpec querySpec, Consumer<Predicate> joinPredicateConsumer, SessionFactoryImplementor sessionFactory)
Deprecated as a consequence of | |
| addNestedTableGroupJoin | back to summary |
|---|---|
| public void addNestedTableGroupJoin(TableGroupJoin join) Overrides org. Implements org. Doc from org. A nested table group join is a join against a table group,
that is ensured to be joined against the primary table reference and table reference joins in isolation,
prior to doing other table group joins e.g.
| |
| addTableGroupJoin | back to summary |
|---|---|
| public void addTableGroupJoin(TableGroupJoin join) Overrides org. Implements org.
| |
| applyAffectedTableNames | back to summary |
|---|---|
| public void applyAffectedTableNames(Consumer<String> nameCollector) Implements org.
| |
| findCompatibleJoinedGroup | back to summary |
|---|---|
| public TableGroup findCompatibleJoinedGroup(TableGroupJoinProducer joinProducer, SqlAstJoinType requestedJoinType) Overrides default org.
| |
| getCorrelatedTableGroup | back to summary |
|---|---|
| public TableGroup getCorrelatedTableGroup() | |
| getJoinPredicateConsumer | back to summary |
|---|---|
| public Consumer | |
| getPrimaryTableReference | back to summary |
|---|---|
| public TableReference getPrimaryTableReference() Implements abstract org. Implements org.
| |
| getTableReference | back to summary |
|---|---|
| public TableReference getTableReference(NavigablePath navigablePath, ValuedModelPart modelPart, String tableExpression, boolean resolve) Overrides default org.
| |
| getTableReference | back to summary |
|---|---|
| public TableReference getTableReference(NavigablePath navigablePath, String tableExpression, boolean resolve) Overrides org. Implements org. Doc from org. Returns the table reference for the table expression, or null if not found.
| |
| getTableReferenceJoins | back to summary |
|---|---|
| public List Implements abstract org. Implements org.
| |
| prependTableGroupJoin | back to summary |
|---|---|
| public void prependTableGroupJoin(NavigablePath navigablePath, TableGroupJoin join) Overrides org. Implements org. Doc from org. Adds the given table group join before a join as found via the given navigable path.
| |
| registerPredicate | back to summary |
|---|---|
| private void registerPredicate(TableGroupJoin join) | |