Skip to content

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