-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow models to specifiy conflict keys
fixes Kong#12288 The upsert DAO function generated uses the primary key as an "ON CONFLICT" match. This might not be the case if a field uses a unique flag or if that field is also workgroupable. Postgresql requires an index to be specified. I tried autodetecting the correct behavior but it failed on other models. Changing the primary key also did not work. I added a way to specify the conflict index. It defaults to the primary key.
- Loading branch information
Showing
3 changed files
with
12 additions
and
1 deletion.
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