HHH-16897 Push a where clause to stack before combining predicates
This commit is contained in:
parent
21f2f24bb7
commit
6e727b6fe4
|
@ -27,6 +27,7 @@ import org.hibernate.query.sqm.tree.from.SqmRoot;
|
||||||
import org.hibernate.query.sqm.tree.insert.SqmInsertStatement;
|
import org.hibernate.query.sqm.tree.insert.SqmInsertStatement;
|
||||||
import org.hibernate.query.sqm.tree.predicate.SqmWhereClause;
|
import org.hibernate.query.sqm.tree.predicate.SqmWhereClause;
|
||||||
import org.hibernate.query.sqm.tree.update.SqmSetClause;
|
import org.hibernate.query.sqm.tree.update.SqmSetClause;
|
||||||
|
import org.hibernate.sql.ast.Clause;
|
||||||
import org.hibernate.sql.ast.spi.SqlAstCreationContext;
|
import org.hibernate.sql.ast.spi.SqlAstCreationContext;
|
||||||
import org.hibernate.sql.ast.spi.SqlAstHelper;
|
import org.hibernate.sql.ast.spi.SqlAstHelper;
|
||||||
import org.hibernate.sql.ast.spi.SqlAstProcessingState;
|
import org.hibernate.sql.ast.spi.SqlAstProcessingState;
|
||||||
|
@ -214,12 +215,14 @@ public class MultiTableSqmMutationConverter extends BaseSqmToSqlAstConverter<Sta
|
||||||
|
|
||||||
pushProcessingState( restrictionProcessingState, getFromClauseIndex() );
|
pushProcessingState( restrictionProcessingState, getFromClauseIndex() );
|
||||||
try {
|
try {
|
||||||
|
getCurrentClauseStack().push( Clause.WHERE );
|
||||||
return SqlAstHelper.combinePredicates(
|
return SqlAstHelper.combinePredicates(
|
||||||
(Predicate) sqmWhereClause.getPredicate().accept( this ),
|
(Predicate) sqmWhereClause.getPredicate().accept( this ),
|
||||||
discriminatorPredicate
|
discriminatorPredicate
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
|
getCurrentClauseStack().pop();
|
||||||
popProcessingStateStack();
|
popProcessingStateStack();
|
||||||
this.parameterResolutionConsumer = null;
|
this.parameterResolutionConsumer = null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue