Skip to content

Commit 00e4086

Browse files
marko-bekhtabeikov
authored andcommitted
HHH-16897 Push a where clause to stack before combining predicates
1 parent b8ca38e commit 00e4086

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/MultiTableSqmMutationConverter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import org.hibernate.query.sqm.tree.insert.SqmInsertStatement;
2828
import org.hibernate.query.sqm.tree.predicate.SqmWhereClause;
2929
import org.hibernate.query.sqm.tree.update.SqmSetClause;
30+
import org.hibernate.sql.ast.Clause;
3031
import org.hibernate.sql.ast.spi.SqlAstCreationContext;
3132
import org.hibernate.sql.ast.spi.SqlAstHelper;
3233
import org.hibernate.sql.ast.spi.SqlAstProcessingState;
@@ -214,12 +215,14 @@ public Expression resolveSqlExpression(
214215

215216
pushProcessingState( restrictionProcessingState, getFromClauseIndex() );
216217
try {
218+
getCurrentClauseStack().push( Clause.WHERE );
217219
return SqlAstHelper.combinePredicates(
218220
(Predicate) sqmWhereClause.getPredicate().accept( this ),
219221
discriminatorPredicate
220222
);
221223
}
222224
finally {
225+
getCurrentClauseStack().pop();
223226
popProcessingStateStack();
224227
this.parameterResolutionConsumer = null;
225228
}

0 commit comments

Comments
 (0)