diff --git a/hibernate-core/src/main/java/org/hibernate/query/hql/internal/QuerySplitter.java b/hibernate-core/src/main/java/org/hibernate/query/hql/internal/QuerySplitter.java index 977c075215..83d1f64eee 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/hql/internal/QuerySplitter.java +++ b/hibernate-core/src/main/java/org/hibernate/query/hql/internal/QuerySplitter.java @@ -22,10 +22,31 @@ import org.hibernate.query.criteria.JpaSearchOrder; import org.hibernate.query.sqm.tree.SqmQuery; import org.hibernate.query.sqm.tree.cte.SqmCteTableColumn; import org.hibernate.query.sqm.tree.cte.SqmSearchClauseSpecification; +import org.hibernate.query.sqm.tree.domain.SqmBagJoin; +import org.hibernate.query.sqm.tree.domain.SqmCorrelatedBagJoin; +import org.hibernate.query.sqm.tree.domain.SqmCorrelatedCrossJoin; +import org.hibernate.query.sqm.tree.domain.SqmCorrelatedEntityJoin; +import org.hibernate.query.sqm.tree.domain.SqmCorrelatedListJoin; +import org.hibernate.query.sqm.tree.domain.SqmCorrelatedMapJoin; +import org.hibernate.query.sqm.tree.domain.SqmCorrelatedPluralPartJoin; +import org.hibernate.query.sqm.tree.domain.SqmCorrelatedRoot; +import org.hibernate.query.sqm.tree.domain.SqmCorrelatedRootJoin; +import org.hibernate.query.sqm.tree.domain.SqmCorrelatedSetJoin; +import org.hibernate.query.sqm.tree.domain.SqmCorrelatedSingularJoin; import org.hibernate.query.sqm.tree.domain.SqmCteRoot; import org.hibernate.query.sqm.tree.domain.SqmDerivedRoot; +import org.hibernate.query.sqm.tree.domain.SqmListJoin; +import org.hibernate.query.sqm.tree.domain.SqmMapJoin; +import org.hibernate.query.sqm.tree.domain.SqmSetJoin; +import org.hibernate.query.sqm.tree.domain.SqmSingularJoin; +import org.hibernate.query.sqm.tree.domain.SqmTreatedPath; +import org.hibernate.query.sqm.tree.domain.SqmTreatedRoot; +import org.hibernate.query.sqm.tree.domain.SqmTreatedSimplePath; +import org.hibernate.query.sqm.tree.expression.SqmAny; +import org.hibernate.query.sqm.tree.expression.SqmEvery; import org.hibernate.query.sqm.tree.from.SqmCteJoin; import org.hibernate.query.sqm.tree.from.SqmDerivedJoin; +import org.hibernate.query.sqm.tree.from.SqmJoin; import org.hibernate.query.sqm.tree.select.SqmSelectQuery; import org.hibernate.spi.NavigablePath; import org.hibernate.query.hql.spi.SqmCreationOptions; @@ -54,7 +75,6 @@ import org.hibernate.query.sqm.tree.expression.SqmLiteralEntityType; import org.hibernate.query.sqm.tree.expression.SqmNamedParameter; import org.hibernate.query.sqm.tree.expression.SqmPositionalParameter; import org.hibernate.query.sqm.tree.expression.SqmUnaryOperation; -import org.hibernate.query.sqm.tree.from.SqmAttributeJoin; import org.hibernate.query.sqm.tree.from.SqmCrossJoin; import org.hibernate.query.sqm.tree.from.SqmEntityJoin; import org.hibernate.query.sqm.tree.from.SqmFrom; @@ -190,8 +210,8 @@ public class QuerySplitter { private final SqmCreationContext creationContext; private final Stack processingStateStack = new StandardStack<>( SqmCreationProcessingState.class ); - private Map sqmPathCopyMap = new HashMap<>(); - private Map sqmFromCopyMap = new HashMap<>(); + private final Map sqmPathCopyMap = new HashMap<>(); + private final Map sqmFromCopyMap = new HashMap<>(); private UnmappedPolymorphismReplacer( SqmRoot unmappedPolymorphicFromElement, @@ -598,16 +618,28 @@ public class QuerySplitter { if ( sqmFrom != null ) { return (SqmCrossJoin) sqmFrom; } - final SqmRoot sqmRoot = (SqmRoot) sqmFromCopyMap.get( join.findRoot() ); final SqmCrossJoin copy = new SqmCrossJoin<>( join.getReferencedPathSource(), join.getExplicitAlias(), - sqmRoot + (SqmRoot) sqmFromCopyMap.get( join.findRoot() ) ); - getProcessingStateStack().getCurrent().getPathRegistry().register( copy ); - sqmFromCopyMap.put( join, copy ); - sqmPathCopyMap.put( join.getNavigablePath(), copy ); - sqmRoot.addSqmJoin( copy ); + + visitJoins( join, copy ); + return copy; + } + + @Override + public SqmCorrelatedCrossJoin visitCorrelatedCrossJoin(SqmCorrelatedCrossJoin join) { + final SqmFrom sqmFrom = sqmFromCopyMap.get( join ); + if ( sqmFrom != null ) { + return (SqmCorrelatedCrossJoin) sqmFrom; + } + + final SqmCorrelatedCrossJoin copy = new SqmCorrelatedCrossJoin<>( + findSqmFromCopy( join.getCorrelationParent() ) + ); + + visitJoins( join, copy ); return copy; } @@ -617,18 +649,29 @@ public class QuerySplitter { if ( sqmFrom != null ) { return (SqmPluralPartJoin) sqmFrom; } - final SqmFrom newLhs = (SqmFrom) sqmFromCopyMap.get( join.getLhs() ); final SqmPluralPartJoin copy = new SqmPluralPartJoin<>( - newLhs, + (SqmFrom) sqmFromCopyMap.get( join.getLhs() ), join.getReferencedPathSource(), join.getExplicitAlias(), join.getSqmJoinType(), join.nodeBuilder() ); - getProcessingStateStack().getCurrent().getPathRegistry().register( copy ); - sqmFromCopyMap.put( join, copy ); - sqmPathCopyMap.put( join.getNavigablePath(), copy ); - newLhs.addSqmJoin( copy ); + + visitJoins( join, copy ); + return copy; + } + + @Override + public SqmCorrelatedPluralPartJoin visitCorrelatedPluralPartJoin(SqmCorrelatedPluralPartJoin join) { + final SqmFrom sqmFrom = sqmFromCopyMap.get( join ); + if ( sqmFrom != null ) { + return (SqmCorrelatedPluralPartJoin) sqmFrom; + } + final SqmCorrelatedPluralPartJoin copy = new SqmCorrelatedPluralPartJoin<>( + findSqmFromCopy( join.getCorrelationParent() ) + ); + + visitJoins( join, copy ); return copy; } @@ -645,24 +688,235 @@ public class QuerySplitter { join.getSqmJoinType(), sqmRoot ); - getProcessingStateStack().getCurrent().getPathRegistry().register( copy ); - sqmFromCopyMap.put( join, copy ); - sqmPathCopyMap.put( join.getNavigablePath(), copy ); - sqmRoot.addSqmJoin( copy ); + + visitJoins( join, copy ); return copy; } @Override - public SqmAttributeJoin visitQualifiedAttributeJoin(SqmAttributeJoin join) { - SqmFrom sqmFrom = sqmFromCopyMap.get( join ); + public SqmCorrelatedRootJoin visitCorrelatedRootJoin(SqmCorrelatedRootJoin correlatedRootJoin) { + final SqmCorrelatedRootJoin sqmFrom = (SqmCorrelatedRootJoin) sqmFromCopyMap.get( correlatedRootJoin ); if ( sqmFrom != null ) { - return (SqmAttributeJoin) sqmFrom; + return sqmFrom; } - SqmAttributeJoin copy = join.makeCopy( getProcessingStateStack().getCurrent() ); - getProcessingStateStack().getCurrent().getPathRegistry().register( copy ); - sqmFromCopyMap.put( join, copy ); - sqmPathCopyMap.put( join.getNavigablePath(), copy ); - ( (SqmFrom) copy.getParent() ).addSqmJoin( copy ); + SqmCorrelatedRootJoin copy = new SqmCorrelatedRootJoin<>( + correlatedRootJoin.getNavigablePath(), + correlatedRootJoin.getReferencedPathSource(), + correlatedRootJoin.nodeBuilder() + ); + correlatedRootJoin.visitReusablePaths( path -> path.accept( this ) ); + + sqmFromCopyMap.put( correlatedRootJoin, copy ); + sqmPathCopyMap.put( correlatedRootJoin.getNavigablePath(), copy ); + correlatedRootJoin.visitSqmJoins( + sqmJoin -> + sqmJoin.accept( this ) + ); + + return copy; + } + + @Override + public SqmCorrelatedRoot visitCorrelatedRoot(SqmCorrelatedRoot correlatedRoot) { + final SqmCorrelatedRoot sqmFrom = (SqmCorrelatedRoot) sqmFromCopyMap.get( correlatedRoot ); + if ( sqmFrom != null ) { + return sqmFrom; + } + SqmCorrelatedRoot copy = new SqmCorrelatedRoot<>( + findSqmFromCopy( correlatedRoot.getCorrelationParent() ) + ); + + correlatedRoot.visitReusablePaths( path -> path.accept( this ) ); + + sqmFromCopyMap.put( correlatedRoot, copy ); + sqmPathCopyMap.put( correlatedRoot.getNavigablePath(), copy ); + correlatedRoot.visitSqmJoins( + sqmJoin -> + sqmJoin.accept( this ) + ); + return copy; + } + + @Override + public SqmBagJoin visitBagJoin(SqmBagJoin join) { + final SqmFrom existing = sqmFromCopyMap.get( join ); + if ( existing != null ) { + return (SqmBagJoin) existing; + } + + final SqmBagJoin copy = new SqmBagJoin<>( + findSqmFromCopy( join.getLhs() ), + join.getReferencedPathSource(), + join.getExplicitAlias(), + join.getSqmJoinType(), + join.isFetched(), + join.nodeBuilder() + ); + + visitJoins( join, copy ); + return copy; + } + + @Override + public SqmCorrelatedBagJoin visitCorrelatedBagJoin(SqmCorrelatedBagJoin join) { + final SqmFrom existing = sqmFromCopyMap.get( join ); + if ( existing != null ) { + return (SqmCorrelatedBagJoin) existing; + } + + final SqmCorrelatedBagJoin copy = new SqmCorrelatedBagJoin<>( + findSqmFromCopy( join.getCorrelationParent() ) + ); + + visitJoins( join, copy ); + return copy; + } + + @Override + public SqmCorrelatedListJoin visitCorrelatedListJoin(SqmCorrelatedListJoin join) { + final SqmFrom existing = sqmFromCopyMap.get( join ); + + if ( existing != null ) { + return (SqmCorrelatedListJoin) existing; + } + + final SqmCorrelatedListJoin copy = new SqmCorrelatedListJoin<>( + findSqmFromCopy( join.getCorrelationParent() ) + ); + + visitJoins( join, copy ); + return copy; + } + + @Override + public SqmCorrelatedMapJoin visitCorrelatedMapJoin(SqmCorrelatedMapJoin join) { + final SqmFrom existing = sqmFromCopyMap.get( join ); + + if ( existing != null ) { + return (SqmCorrelatedMapJoin) existing; + } + + final SqmCorrelatedMapJoin copy = new SqmCorrelatedMapJoin<>( + findSqmFromCopy( join.getCorrelationParent() ) + ); + + visitJoins( join, copy ); + return copy; + } + + @Override + public SqmCorrelatedSetJoin visitCorrelatedSetJoin(SqmCorrelatedSetJoin join) { + final SqmFrom existing = sqmFromCopyMap.get( join ); + + if ( existing != null ) { + return (SqmCorrelatedSetJoin) existing; + } + + final SqmCorrelatedSetJoin copy = new SqmCorrelatedSetJoin<>( + findSqmFromCopy( join.getCorrelationParent() ) + ); + + visitJoins( join, copy ); + return copy; + } + + @Override + public SqmCorrelatedSingularJoin visitCorrelatedSingularJoin(SqmCorrelatedSingularJoin join) { + final SqmFrom existing = sqmFromCopyMap.get( join ); + + if ( existing != null ) { + return (SqmCorrelatedSingularJoin) existing; + } + + final SqmCorrelatedSingularJoin copy = new SqmCorrelatedSingularJoin<>( + findSqmFromCopy( join.getCorrelationParent() ) + ); + + visitJoins( join, copy ); + return copy; + } + + @Override + public SqmListJoin visitListJoin(SqmListJoin join) { + final SqmFrom existing = sqmFromCopyMap.get( join ); + + if ( existing != null ) { + return (SqmListJoin) existing; + } + + final SqmListJoin copy = new SqmListJoin<>( + findSqmFromCopy( join.getLhs() ), + join.getReferencedPathSource(), + join.getExplicitAlias(), + join.getSqmJoinType(), + join.isFetched(), + join.nodeBuilder() + ); + + visitJoins( join, copy ); + return copy; + } + + @Override + public SqmMapJoin visitMapJoin(SqmMapJoin join) { + final SqmFrom existing = sqmFromCopyMap.get( join ); + + if ( existing != null ) { + return (SqmMapJoin) existing; + } + + final SqmMapJoin copy = new SqmMapJoin<>( + findSqmFromCopy( join.getLhs() ), + join.getReferencedPathSource(), + join.getExplicitAlias(), + join.getSqmJoinType(), + join.isFetched(), + join.nodeBuilder() + ); + + visitJoins( join, copy ); + return copy; + } + + @Override + public SqmSetJoin visitSetJoin(SqmSetJoin join) { + final SqmFrom existing = sqmFromCopyMap.get( join ); + + if ( existing != null ) { + return (SqmSetJoin) existing; + } + + final SqmSetJoin copy = new SqmSetJoin<>( + findSqmFromCopy( join.getLhs() ), + join.getReferencedPathSource(), + join.getExplicitAlias(), + join.getSqmJoinType(), + join.isFetched(), + join.nodeBuilder() + ); + + visitJoins( join, copy ); + return copy; + } + + @Override + public SqmSingularJoin visitSingularJoin(SqmSingularJoin join) { + final SqmFrom existing = sqmFromCopyMap.get( join ); + + if ( existing != null ) { + return (SqmSingularJoin) existing; + } + + final SqmSingularJoin copy = new SqmSingularJoin<>( + findSqmFromCopy( join.getLhs() ), + join.getReferencedPathSource(), + join.getExplicitAlias(), + join.getSqmJoinType(), + join.isFetched(), + join.nodeBuilder() + ); + + visitJoins( join, copy ); return copy; } @@ -680,10 +934,23 @@ public class QuerySplitter { join.isLateral(), sqmRoot ); - getProcessingStateStack().getCurrent().getPathRegistry().register( copy ); - sqmFromCopyMap.put( join, copy ); - sqmPathCopyMap.put( join.getNavigablePath(), copy ); - sqmRoot.addSqmJoin( copy ); + + visitJoins( join, copy ); + return copy; + } + + @Override + public SqmCorrelatedEntityJoin visitCorrelatedEntityJoin(SqmCorrelatedEntityJoin join) { + SqmFrom sqmFrom = sqmFromCopyMap.get( join ); + if ( sqmFrom != null ) { + return (SqmCorrelatedEntityJoin) sqmFrom; + } + + final SqmCorrelatedEntityJoin copy = new SqmCorrelatedEntityJoin( + findSqmFromCopy( join.getCorrelationParent() ) + ); + + visitJoins( join, copy ); return copy; } @@ -700,10 +967,8 @@ public class QuerySplitter { join.getSqmJoinType(), sqmRoot ); - getProcessingStateStack().getCurrent().getPathRegistry().register( copy ); - sqmFromCopyMap.put( join, copy ); - sqmPathCopyMap.put( join.getNavigablePath(), copy ); - sqmRoot.addSqmJoin( copy ); + + visitJoins( join, copy ); return copy; } @@ -711,7 +976,7 @@ public class QuerySplitter { public SqmBasicValuedSimplePath visitBasicValuedPath(SqmBasicValuedSimplePath path) { final SqmPathRegistry pathRegistry = getProcessingStateStack().getCurrent().getPathRegistry(); - final SqmPath lhs = findLhs( path, pathRegistry ); + final SqmPath lhs = findLhs( path ); final SqmBasicValuedSimplePath copy = new SqmBasicValuedSimplePath<>( lhs.getNavigablePath().append( path.getNavigablePath().getLocalName() ), @@ -728,7 +993,7 @@ public class QuerySplitter { @Override public SqmEmbeddedValuedSimplePath visitEmbeddableValuedPath(SqmEmbeddedValuedSimplePath path) { final SqmPathRegistry pathRegistry = getProcessingStateStack().getCurrent().getPathRegistry(); - final SqmPath lhs = findLhs( path, pathRegistry ); + final SqmPath lhs = findLhs( path ); final SqmEmbeddedValuedSimplePath copy = new SqmEmbeddedValuedSimplePath<>( lhs.getNavigablePath().append( path.getNavigablePath().getLocalName() ), path.getReferencedPathSource(), @@ -743,7 +1008,7 @@ public class QuerySplitter { @Override public SqmEntityValuedSimplePath visitEntityValuedPath(SqmEntityValuedSimplePath path) { final SqmPathRegistry pathRegistry = getProcessingStateStack().getCurrent().getPathRegistry(); - final SqmPath lhs = findLhs( path, pathRegistry ); + final SqmPath lhs = findLhs( path ); final SqmEntityValuedSimplePath copy = new SqmEntityValuedSimplePath<>( lhs.getNavigablePath().append( path.getNavigablePath().getLocalName() ), path.getReferencedPathSource(), @@ -758,7 +1023,7 @@ public class QuerySplitter { @Override public SqmPluralValuedSimplePath visitPluralValuedPath(SqmPluralValuedSimplePath path) { final SqmPathRegistry pathRegistry = getProcessingStateStack().getCurrent().getPathRegistry(); - SqmPath lhs = findLhs( path, pathRegistry ); + SqmPath lhs = findLhs( path ); final SqmPluralValuedSimplePath copy = new SqmPluralValuedSimplePath<>( path.getNavigablePath(), @@ -771,11 +1036,11 @@ public class QuerySplitter { return copy; } - private SqmPath findLhs(SqmPath path, SqmPathRegistry pathRegistry) { + private SqmPath findLhs(SqmPath path) { final SqmPath lhs = path.getLhs(); - final SqmPath sqmFrom = sqmPathCopyMap.get( lhs.getNavigablePath() ); - if ( sqmFrom != null ) { - return pathRegistry.findFromByPath( sqmFrom.getNavigablePath() ); + final SqmPath lhsSqmPathCopy = sqmPathCopyMap.get( lhs.getNavigablePath() ); + if ( lhsSqmPathCopy != null ) { + return lhsSqmPathCopy; } else { return (SqmPath) lhs.accept( this ); @@ -1022,6 +1287,28 @@ public class QuerySplitter { ); } + @Override + public Object visitAny(SqmAny sqmAny) { + return new SqmAny<>( + (SqmSubQuery) sqmAny.getSubquery().accept( this ), + this.creationContext.getNodeBuilder() + ); + } + + @Override + public Object visitTreatedPath(SqmTreatedPath sqmTreatedPath) { + throw new UnsupportedOperationException("Polymorphic queries: treat operator is not supported"); + } + + @Override + public Object visitEvery(SqmEvery sqmEvery) { + sqmEvery.getSubquery().accept( this ); + return new SqmEvery<>( + (SqmSubQuery) sqmEvery.getSubquery().accept( this ), + this.creationContext.getNodeBuilder() + ); + } + @Override public Stack getProcessingStateStack() { return processingStateStack; @@ -1037,6 +1324,29 @@ public class QuerySplitter { return () -> false; } + public > X findSqmFromCopy(SqmFrom sqmFrom) { + SqmFrom copy = sqmFromCopyMap.get( sqmFrom ); + if ( copy != null ) { + return (X) copy; + } + else { + return (X) sqmFrom.accept( this ); + } + } + + private void visitJoins(SqmFrom join, SqmJoin copy) { + getProcessingStateStack().getCurrent().getPathRegistry().register( copy ); + sqmFromCopyMap.put( join, copy ); + sqmPathCopyMap.put( join.getNavigablePath(), copy ); + join.visitSqmJoins( + sqmJoin -> + sqmJoin.accept( this ) + ); + SqmFrom lhs = (SqmFrom) copy.getLhs(); + if ( lhs != null ) { + lhs.addSqmJoin( copy ); + } + } } } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/SemanticQueryWalker.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/SemanticQueryWalker.java index e12a5ee2de..cc1e79cc2f 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/SemanticQueryWalker.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/SemanticQueryWalker.java @@ -15,7 +15,18 @@ import org.hibernate.query.sqm.tree.cte.SqmCteStatement; import org.hibernate.query.sqm.tree.delete.SqmDeleteStatement; import org.hibernate.query.sqm.tree.domain.NonAggregatedCompositeSimplePath; import org.hibernate.query.sqm.tree.domain.SqmAnyValuedSimplePath; +import org.hibernate.query.sqm.tree.domain.SqmBagJoin; import org.hibernate.query.sqm.tree.domain.SqmBasicValuedSimplePath; +import org.hibernate.query.sqm.tree.domain.SqmCorrelatedBagJoin; +import org.hibernate.query.sqm.tree.domain.SqmCorrelatedCrossJoin; +import org.hibernate.query.sqm.tree.domain.SqmCorrelatedEntityJoin; +import org.hibernate.query.sqm.tree.domain.SqmCorrelatedListJoin; +import org.hibernate.query.sqm.tree.domain.SqmCorrelatedMapJoin; +import org.hibernate.query.sqm.tree.domain.SqmCorrelatedPluralPartJoin; +import org.hibernate.query.sqm.tree.domain.SqmCorrelatedRoot; +import org.hibernate.query.sqm.tree.domain.SqmCorrelatedRootJoin; +import org.hibernate.query.sqm.tree.domain.SqmCorrelatedSetJoin; +import org.hibernate.query.sqm.tree.domain.SqmCorrelatedSingularJoin; import org.hibernate.query.sqm.tree.domain.SqmCorrelation; import org.hibernate.query.sqm.tree.domain.SqmCteRoot; import org.hibernate.query.sqm.tree.domain.SqmDerivedRoot; @@ -23,11 +34,15 @@ import org.hibernate.query.sqm.tree.domain.SqmEmbeddedValuedSimplePath; import org.hibernate.query.sqm.tree.domain.SqmEntityValuedSimplePath; import org.hibernate.query.sqm.tree.domain.SqmFkExpression; import org.hibernate.query.sqm.tree.domain.SqmIndexedCollectionAccessPath; +import org.hibernate.query.sqm.tree.domain.SqmListJoin; import org.hibernate.query.sqm.tree.domain.SqmMapEntryReference; import org.hibernate.query.sqm.tree.domain.SqmElementAggregateFunction; import org.hibernate.query.sqm.tree.domain.SqmIndexAggregateFunction; +import org.hibernate.query.sqm.tree.domain.SqmMapJoin; import org.hibernate.query.sqm.tree.domain.SqmPluralPartJoin; import org.hibernate.query.sqm.tree.domain.SqmPluralValuedSimplePath; +import org.hibernate.query.sqm.tree.domain.SqmSetJoin; +import org.hibernate.query.sqm.tree.domain.SqmSingularJoin; import org.hibernate.query.sqm.tree.domain.SqmTreatedPath; import org.hibernate.query.sqm.tree.expression.JpaCriteriaParameter; import org.hibernate.query.sqm.tree.expression.SqmAny; @@ -147,6 +162,58 @@ public interface SemanticQueryWalker { T visitQualifiedAttributeJoin(SqmAttributeJoin joinedFromElement); + default T visitCorrelatedCrossJoin(SqmCorrelatedCrossJoin join) { + return visitCrossJoin( join ); + } + + default T visitCorrelatedEntityJoin(SqmCorrelatedEntityJoin join) { + return visitQualifiedEntityJoin( join ); + } + + default T visitCorrelatedPluralPartJoin(SqmCorrelatedPluralPartJoin join) { + return visitPluralPartJoin( join ); + } + + default T visitBagJoin(SqmBagJoin join){ + return visitQualifiedAttributeJoin( join ); + } + + default T visitCorrelatedBagJoin(SqmCorrelatedBagJoin join) { + return visitQualifiedAttributeJoin( join ); + } + + default T visitCorrelatedListJoin(SqmCorrelatedListJoin join) { + return visitQualifiedAttributeJoin( join ); + } + + default T visitCorrelatedMapJoin(SqmCorrelatedMapJoin join) { + return visitQualifiedAttributeJoin( join ); + } + + default T visitCorrelatedSetJoin(SqmCorrelatedSetJoin join) { + return visitQualifiedAttributeJoin( join ); + } + + default T visitCorrelatedSingularJoin(SqmCorrelatedSingularJoin join) { + return visitQualifiedAttributeJoin( join ); + } + + default T visitListJoin(SqmListJoin join) { + return visitQualifiedAttributeJoin( join ); + } + + default T visitMapJoin(SqmMapJoin join) { + return visitQualifiedAttributeJoin( join ); + } + + default T visitSetJoin(SqmSetJoin join) { + return visitQualifiedAttributeJoin( join ); + } + + default T visitSingularJoin(SqmSingularJoin join) { + return visitQualifiedAttributeJoin( join ); + } + T visitQualifiedDerivedJoin(SqmDerivedJoin joinedFromElement); T visitQualifiedCteJoin(SqmCteJoin joinedFromElement); @@ -177,6 +244,13 @@ public interface SemanticQueryWalker { T visitCorrelation(SqmCorrelation correlation); + default T visitCorrelatedRootJoin(SqmCorrelatedRootJoin correlatedRootJoin){ + return visitCorrelation( correlatedRootJoin ); + } + + default T visitCorrelatedRoot(SqmCorrelatedRoot correlatedRoot){ + return visitCorrelation( correlatedRoot ); + } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Query spec @@ -328,4 +402,5 @@ public interface SemanticQueryWalker { T visitMapEntryFunction(SqmMapEntryReference function); T visitFullyQualifiedClass(Class namedClass); + } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmBagJoin.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmBagJoin.java index 95fc623aac..8e15b1586a 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmBagJoin.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmBagJoin.java @@ -10,6 +10,7 @@ import java.util.Collection; import org.hibernate.metamodel.model.domain.BagPersistentAttribute; import org.hibernate.metamodel.model.domain.EntityDomainType; +import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.spi.NavigablePath; import org.hibernate.query.criteria.JpaCollectionJoin; import org.hibernate.query.criteria.JpaExpression; @@ -81,6 +82,11 @@ public class SqmBagJoin extends AbstractSqmPluralJoin, E> return getReferencedPathSource(); } + @Override + public X accept(SemanticQueryWalker walker) { + return walker.visitBagJoin( this ); + } + @Override public BagPersistentAttribute getAttribute() { //noinspection unchecked @@ -149,4 +155,5 @@ public class SqmBagJoin extends AbstractSqmPluralJoin, E> nodeBuilder() ); } + } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedBagJoin.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedBagJoin.java index 7daca4370b..1be4b7cee8 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedBagJoin.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedBagJoin.java @@ -10,6 +10,7 @@ import org.hibernate.metamodel.model.domain.BagPersistentAttribute; import org.hibernate.query.hql.spi.SqmCreationProcessingState; import org.hibernate.query.hql.spi.SqmPathRegistry; import org.hibernate.query.sqm.NodeBuilder; +import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.query.sqm.tree.SqmCopyContext; import org.hibernate.query.sqm.tree.SqmJoinType; import org.hibernate.query.sqm.tree.from.SqmFrom; @@ -74,6 +75,11 @@ public class SqmCorrelatedBagJoin extends SqmBagJoin implements SqmC return path; } + @Override + public X accept(SemanticQueryWalker walker) { + return walker.visitCorrelatedBagJoin( this ); + } + @Override public SqmBagJoin getCorrelationParent() { return correlationParent; @@ -108,4 +114,5 @@ public class SqmCorrelatedBagJoin extends SqmBagJoin implements SqmC pathRegistry.findFromByPath( correlationParent.getNavigablePath() ) ); } + } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedCrossJoin.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedCrossJoin.java index 72dc71a8ad..4861bf96ca 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedCrossJoin.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedCrossJoin.java @@ -9,6 +9,7 @@ package org.hibernate.query.sqm.tree.domain; import org.hibernate.metamodel.model.domain.EntityDomainType; import org.hibernate.query.hql.spi.SqmCreationProcessingState; import org.hibernate.query.hql.spi.SqmPathRegistry; +import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.query.sqm.tree.SqmCopyContext; import org.hibernate.query.sqm.tree.from.SqmCrossJoin; import org.hibernate.query.sqm.tree.from.SqmRoot; @@ -94,4 +95,10 @@ public class SqmCorrelatedCrossJoin extends SqmCrossJoin implements SqmCor pathRegistry.findFromByPath( correlationParent.getNavigablePath() ) ); } + + @Override + public X accept(SemanticQueryWalker walker) { + return walker.visitCorrelatedCrossJoin( this ); + } + } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedEntityJoin.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedEntityJoin.java index 589ba9821d..0ad2cf1c2e 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedEntityJoin.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedEntityJoin.java @@ -9,6 +9,7 @@ package org.hibernate.query.sqm.tree.domain; import org.hibernate.metamodel.model.domain.EntityDomainType; import org.hibernate.query.hql.spi.SqmCreationProcessingState; import org.hibernate.query.hql.spi.SqmPathRegistry; +import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.query.sqm.tree.SqmCopyContext; import org.hibernate.query.sqm.tree.SqmJoinType; import org.hibernate.query.sqm.tree.from.SqmEntityJoin; @@ -67,6 +68,11 @@ public class SqmCorrelatedEntityJoin extends SqmEntityJoin implements SqmC return path; } + @Override + public X accept(SemanticQueryWalker walker) { + return walker.visitCorrelatedEntityJoin(this); + } + @Override public SqmEntityJoin getCorrelationParent() { return correlationParent; @@ -99,4 +105,5 @@ public class SqmCorrelatedEntityJoin extends SqmEntityJoin implements SqmC pathRegistry.findFromByPath( correlationParent.getNavigablePath() ) ); } + } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedListJoin.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedListJoin.java index 4bae7141b6..99b815a2bf 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedListJoin.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedListJoin.java @@ -10,6 +10,7 @@ import org.hibernate.metamodel.model.domain.ListPersistentAttribute; import org.hibernate.query.hql.spi.SqmCreationProcessingState; import org.hibernate.query.hql.spi.SqmPathRegistry; import org.hibernate.query.sqm.NodeBuilder; +import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.query.sqm.tree.SqmCopyContext; import org.hibernate.query.sqm.tree.SqmJoinType; import org.hibernate.query.sqm.tree.from.SqmFrom; @@ -108,4 +109,9 @@ public class SqmCorrelatedListJoin extends SqmListJoin implements Sq pathRegistry.findFromByPath( correlationParent.getNavigablePath() ) ); } + + @Override + public X accept(SemanticQueryWalker walker) { + return walker.visitCorrelatedListJoin( this ); + } } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedMapJoin.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedMapJoin.java index 3c01110409..4f0f124713 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedMapJoin.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedMapJoin.java @@ -10,6 +10,7 @@ import org.hibernate.metamodel.model.domain.MapPersistentAttribute; import org.hibernate.query.hql.spi.SqmCreationProcessingState; import org.hibernate.query.hql.spi.SqmPathRegistry; import org.hibernate.query.sqm.NodeBuilder; +import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.query.sqm.tree.SqmCopyContext; import org.hibernate.query.sqm.tree.SqmJoinType; import org.hibernate.query.sqm.tree.from.SqmFrom; @@ -108,4 +109,9 @@ public class SqmCorrelatedMapJoin extends SqmMapJoin implement pathRegistry.findFromByPath( correlationParent.getNavigablePath() ) ); } + + @Override + public X accept(SemanticQueryWalker walker) { + return walker.visitCorrelatedMapJoin( this ); + } } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedPluralPartJoin.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedPluralPartJoin.java index ea01981c1e..21c5e67d86 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedPluralPartJoin.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedPluralPartJoin.java @@ -6,6 +6,7 @@ */ package org.hibernate.query.sqm.tree.domain; +import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.query.sqm.tree.SqmCopyContext; import org.hibernate.query.sqm.tree.SqmJoinType; import org.hibernate.query.sqm.tree.from.SqmFrom; @@ -46,6 +47,16 @@ public class SqmCorrelatedPluralPartJoin extends SqmPluralPartJoin i return path; } + @Override + public X accept(SemanticQueryWalker walker) { + return walker.visitCorrelatedPluralPartJoin( this ); + } + + @Override + public SqmFrom getLhs() { + return (SqmFrom) super.getLhs(); + } + @Override public SqmPluralPartJoin getCorrelationParent() { return correlationParent; @@ -65,4 +76,5 @@ public class SqmCorrelatedPluralPartJoin extends SqmPluralPartJoin i public SqmRoot getCorrelatedRoot() { return correlatedRootJoin; } + } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedRoot.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedRoot.java index 87f907c865..46b6a2e6cc 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedRoot.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedRoot.java @@ -14,7 +14,7 @@ import org.hibernate.query.sqm.tree.from.SqmRoot; /** * @author Steve Ebersole */ -public class SqmCorrelatedRoot extends SqmRoot implements SqmPathWrapper, SqmCorrelation { +public class SqmCorrelatedRoot extends SqmRoot implements SqmPathWrapper, SqmCorrelation { private final SqmRoot correlationParent; @@ -80,6 +80,6 @@ public class SqmCorrelatedRoot extends SqmRoot implements SqmPathWrapper X accept(SemanticQueryWalker walker) { - return walker.visitCorrelation( this ); + return walker.visitCorrelatedRoot( this ); } } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedRootJoin.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedRootJoin.java index 156ccf15ab..cd03c5bc61 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedRootJoin.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedRootJoin.java @@ -20,7 +20,7 @@ import org.hibernate.query.sqm.tree.from.SqmRoot; */ public class SqmCorrelatedRootJoin extends SqmRoot implements SqmCorrelation { - SqmCorrelatedRootJoin( + public SqmCorrelatedRootJoin( NavigablePath navigablePath, SqmPathSource referencedNavigable, NodeBuilder nodeBuilder) { @@ -89,6 +89,7 @@ public class SqmCorrelatedRootJoin extends SqmRoot implements SqmCorrelati @Override public X accept(SemanticQueryWalker walker) { - return walker.visitCorrelation( this ); + return walker.visitCorrelatedRootJoin( this ); } + } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedSetJoin.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedSetJoin.java index e35ad86afa..d9381bcfd8 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedSetJoin.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedSetJoin.java @@ -10,6 +10,7 @@ import org.hibernate.metamodel.model.domain.SetPersistentAttribute; import org.hibernate.query.hql.spi.SqmCreationProcessingState; import org.hibernate.query.hql.spi.SqmPathRegistry; import org.hibernate.query.sqm.NodeBuilder; +import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.query.sqm.tree.SqmCopyContext; import org.hibernate.query.sqm.tree.SqmJoinType; import org.hibernate.query.sqm.tree.from.SqmFrom; @@ -108,4 +109,9 @@ public class SqmCorrelatedSetJoin extends SqmSetJoin implements SqmC pathRegistry.findFromByPath( correlationParent.getNavigablePath() ) ); } + + @Override + public X accept(SemanticQueryWalker walker) { + return walker.visitCorrelatedSetJoin( this ); + } } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedSingularJoin.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedSingularJoin.java index 9b14bc7e14..85283485a6 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedSingularJoin.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedSingularJoin.java @@ -10,6 +10,7 @@ import org.hibernate.metamodel.model.domain.SingularPersistentAttribute; import org.hibernate.query.hql.spi.SqmCreationProcessingState; import org.hibernate.query.hql.spi.SqmPathRegistry; import org.hibernate.query.sqm.NodeBuilder; +import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.query.sqm.tree.SqmCopyContext; import org.hibernate.query.sqm.tree.SqmJoinType; import org.hibernate.query.sqm.tree.from.SqmFrom; @@ -108,4 +109,9 @@ public class SqmCorrelatedSingularJoin extends SqmSingularJoin imple pathRegistry.findFromByPath( correlationParent.getNavigablePath() ) ); } + + @Override + public X accept(SemanticQueryWalker walker) { + return walker.visitCorrelatedSingularJoin( this ); + } } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelation.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelation.java index ee24b8c713..cc49816413 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelation.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelation.java @@ -17,4 +17,5 @@ import org.hibernate.query.sqm.tree.from.SqmRoot; */ public interface SqmCorrelation extends SqmFrom, SqmPathWrapper { SqmRoot getCorrelatedRoot(); + } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmListJoin.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmListJoin.java index abf372b804..8bceb53f87 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmListJoin.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmListJoin.java @@ -10,6 +10,7 @@ import java.util.List; import org.hibernate.metamodel.model.domain.EntityDomainType; import org.hibernate.metamodel.model.domain.ListPersistentAttribute; +import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.spi.NavigablePath; import org.hibernate.query.criteria.JpaExpression; import org.hibernate.query.criteria.JpaListJoin; @@ -84,6 +85,11 @@ public class SqmListJoin return getReferencedPathSource(); } + @Override + public X accept(SemanticQueryWalker walker) { + return walker.visitListJoin( this ); + } + @Override public ListPersistentAttribute getAttribute() { //noinspection unchecked @@ -156,4 +162,5 @@ public class SqmListJoin nodeBuilder() ); } + } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmMapJoin.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmMapJoin.java index 5ed057033e..22f1ed6acc 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmMapJoin.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmMapJoin.java @@ -13,6 +13,7 @@ import jakarta.persistence.criteria.Predicate; import org.hibernate.metamodel.model.domain.EntityDomainType; import org.hibernate.metamodel.model.domain.MapPersistentAttribute; +import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.spi.NavigablePath; import org.hibernate.query.criteria.JpaExpression; import org.hibernate.query.criteria.JpaMapJoin; @@ -83,6 +84,11 @@ public class SqmMapJoin return (MapPersistentAttribute) super.getModel(); } + @Override + public X accept(SemanticQueryWalker walker) { + return walker.visitMapJoin( this ); + } + @Override public MapPersistentAttribute getAttribute() { //noinspection unchecked @@ -170,4 +176,5 @@ public class SqmMapJoin nodeBuilder() ); } + } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmSetJoin.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmSetJoin.java index 255080c26e..14b795e69f 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmSetJoin.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmSetJoin.java @@ -10,6 +10,7 @@ import java.util.Set; import org.hibernate.metamodel.model.domain.EntityDomainType; import org.hibernate.metamodel.model.domain.SetPersistentAttribute; +import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.spi.NavigablePath; import org.hibernate.query.criteria.JpaExpression; import org.hibernate.query.criteria.JpaPredicate; @@ -83,6 +84,11 @@ public class SqmSetJoin return getReferencedPathSource(); } + @Override + public X accept(SemanticQueryWalker walker) { + return walker.visitSetJoin( this ); + } + @Override public SetPersistentAttribute getAttribute() { return getReferencedPathSource(); @@ -142,6 +148,7 @@ public class SqmSetJoin return fetch( attributeName, JoinType.INNER); } + @Override public SqmAttributeJoin makeCopy(SqmCreationProcessingState creationProcessingState) { return new SqmSetJoin<>( diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmSingularJoin.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmSingularJoin.java index 5c27e55128..e26828fb9d 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmSingularJoin.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmSingularJoin.java @@ -10,6 +10,7 @@ import java.util.Locale; import org.hibernate.metamodel.model.domain.EntityDomainType; import org.hibernate.metamodel.model.domain.SingularPersistentAttribute; +import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.spi.NavigablePath; import org.hibernate.query.hql.spi.SqmCreationProcessingState; import org.hibernate.query.sqm.NodeBuilder; @@ -43,6 +44,11 @@ public class SqmSingularJoin extends AbstractSqmAttributeJoin { super( lhs, joinedNavigable, alias, joinType, fetched, nodeBuilder ); } + @Override + public X accept(SemanticQueryWalker walker) { + return walker.visitSingularJoin(this); + } + protected SqmSingularJoin( SqmFrom lhs, NavigablePath navigablePath, diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/from/SqmAttributeJoin.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/from/SqmAttributeJoin.java index 720d855b3e..ad2e5a2884 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/from/SqmAttributeJoin.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/from/SqmAttributeJoin.java @@ -6,13 +6,12 @@ */ package org.hibernate.query.sqm.tree.from; -import org.hibernate.HibernateException; +import org.hibernate.Remove; import org.hibernate.metamodel.model.domain.EntityDomainType; import org.hibernate.query.criteria.JpaFetch; import org.hibernate.query.criteria.JpaJoin; -import org.hibernate.query.sqm.SqmPathSource; import org.hibernate.query.hql.spi.SqmCreationProcessingState; -import org.hibernate.query.sqm.tree.domain.SqmPath; +import org.hibernate.query.sqm.SqmPathSource; import org.hibernate.query.sqm.tree.predicate.SqmPredicate; import org.hibernate.type.descriptor.java.JavaType; @@ -44,15 +43,11 @@ public interface SqmAttributeJoin extends SqmQualifiedJoin, JpaFetch SqmAttributeJoin treatAs(EntityDomainType treatTarget); - SqmAttributeJoin makeCopy(SqmCreationProcessingState creationProcessingState); + /* + @deprecated not used anymore + */ + @Deprecated + @Remove + SqmAttributeJoin makeCopy( SqmCreationProcessingState creationProcessingState ); - class NotJoinableException extends HibernateException { - public NotJoinableException(String message) { - super( message ); - } - - public NotJoinableException(String message, Throwable cause) { - super( message, cause ); - } - } }