-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(db-mongodb): support query options in db update operations (#9191)
The mongodb adapter `updateOne` method accepts an `options` argument that allows query options to be passed to mongoose. This parameter was added in #8397 to support the `upsert` operation. This `options` parameter can also be useful when using the database adaptor directly without going through the local api. It is true that the Mongoose models could be used directly in such situations, but the adapter methods include a lot of useful functionality, like for instance the sanitization of document and relationship ids, so it is desirable to be able to use the adapter functions while still being able to provide mongoose query options (e.g. `{timestamps: false}`). This PR adds the same options parameter to the other update methods of the mongodb adapter.
- Loading branch information
1 parent
315b4e5
commit 2d2d020
Showing
5 changed files
with
55 additions
and
6 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