mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-08 20:24:46 +00:00
HHH-14251 Invalid SQL for @Embedded UPDATE
This commit is contained in:
parent
cb04aa1e5d
commit
ec7a278358
@ -9,6 +9,7 @@
|
||||
import org.hibernate.QueryException;
|
||||
import org.hibernate.engine.internal.JoinSequence;
|
||||
import org.hibernate.hql.internal.CollectionProperties;
|
||||
import org.hibernate.hql.internal.antlr.HqlSqlTokenTypes;
|
||||
import org.hibernate.hql.internal.antlr.SqlTokenTypes;
|
||||
import org.hibernate.hql.internal.ast.util.ASTUtil;
|
||||
import org.hibernate.hql.internal.ast.util.ColumnHelper;
|
||||
@ -256,7 +257,7 @@ private void initText() {
|
||||
boolean countDistinct = getWalker().isInCountDistinct()
|
||||
&& getWalker().getSessionFactoryHelper().getFactory().getDialect().requiresParensForTupleDistinctCounts();
|
||||
if ( cols.length > 1 &&
|
||||
( getWalker().isComparativeExpressionClause() || countDistinct ) ) {
|
||||
( getWalker().isComparativeExpressionClause() || countDistinct || getWalker().getCurrentClauseType() == HqlSqlTokenTypes.SET ) ) {
|
||||
text = "(" + text + ")";
|
||||
}
|
||||
setText( text );
|
||||
|
Loading…
x
Reference in New Issue
Block a user