Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support mongodb array update operator $[] #442

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kfritsch
Copy link

fixes #378

This pr adds support for the mongodb array update operator $[] by updating mongo-object to the newest version. mongo-object received an update lately specifically to support this feature in the way described in #378 (comment).

This pr only adds tests to show that the update operator works with this version of mongo-object.

Please feel free to move, change and extend the tests and edit the commit message.

@kfritsch
Copy link
Author

kfritsch commented May 10, 2021

While this allows validating updates using arrayFilters, it does not validate the arrayFilter specification itself, which is not even part of the update object. Not sure if this would be worth adding to the docs.

@derwaldgeist
Copy link

Any chance to get this into simpl-schema? Being able to update multiple entries in an array is not a super rare use-case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support $[] operator in updates
2 participants