-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HHH-12492 Qualify references to columns from the target table in subq…
…ueries in DELETE/UPDATE queries Don't try to duplicate the logic from org.hibernate.hql.internal.ast.tree.FromElementType#toColumns(java.lang.String, java.lang.String, boolean, boolean) in other classes, it's complex enough and already seems to handle all the cases we might encounter. In this specific case, we want the table name to be used to qualify column names, because the target table doesn't have any alias (it's not supported by every version of every RDBMS), and not qualifying columns at all may lead to a confusing statement, in particular if tables referenced in the subquery contain columns with the same name. Since we use aliases for every other table in the query, referencing the table should not lead to any conflict.
- Loading branch information
Showing
3 changed files
with
4 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters