-
Notifications
You must be signed in to change notification settings - Fork 551
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ALTER TABLE .. ADD to work if table contains nested primary keys
This fixes #9386 `AnalyzedTableElements.toMapping()` requires the individual table elements to be connected with their child elements to correctly generate the mapping for object columns. Internally when we process a `ALTER TABLE .. ADD` we implicitly re-add all existing primary keys to the `AnalyzedTableElements` structure, but if the primary keys were nested columns we didn't build the object graph. Furthermore, we first used the `ident(..)` setter followed by the `name(..)` setter, the `name(..)` setter implicitly created the `ident` which meant that all nested primary keys were changed to their top-level object name. This caused a `column "xy" specified more than once` error. (cherry picked from commit 717dcd3)
- Loading branch information
1 parent
b158ac8
commit ae24281
Showing
6 changed files
with
72 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
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