We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Queryset.modify
array_filters
Starts from 0.28.0 update, and update_one starts to support kwarg array_filters which inline with https://www.mongodb.com/docs/manual/reference/operator/update/positional-filtered/.
update
update_one
Base on mongodb doc link above, Queryset.modify should also support array_filters, the underlying pymongo function also supports it.
Current behavior mongoengine: 0.28.2
User.objects.filter(id='uid').only('id', 'items').modify( __raw__={'$set': {'items.$[item].done': True}}, array_filters=[{ '$and': [ {'item.id': 'qqq'}, ], }], ) # InvalidQueryError: Cannot resolve field "array_filters"
The solution should be similar to This PR, handle array_filters inside modify function.
modify
The text was updated successfully, but these errors were encountered:
MongoEngine#2811
4d7c271
add array filter to modify
Open fix PR #2812
Sorry, something went wrong.
#2811
94e4c90
Got merged on master
No branches or pull requests
Starts from 0.28.0
update
, andupdate_one
starts to support kwargarray_filters
which inline with https://www.mongodb.com/docs/manual/reference/operator/update/positional-filtered/.Base on mongodb doc link above,
Queryset.modify
should also supportarray_filters
, the underlying pymongo function also supports it.Current behavior
mongoengine: 0.28.2
The solution should be similar to This PR, handle
array_filters
insidemodify
function.The text was updated successfully, but these errors were encountered: