-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(postgres): change returning option to only return model attributes
If an underlying table has columns that don't exist in the model, when using `returning: true` the instance will be created with these extra attributes. This change alters this behavior to only return the fields defined in the model, provided a model definition is passed. BREAKING CHANGE: setting `returning: true` will no longer create attributes on the instance that are not defined in the model. The old default behavior, if desired, can be used by changing the: `returning: true` to `returning: ['*']`
- Loading branch information
Showing
8 changed files
with
216 additions
and
158 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
Oops, something went wrong.