flask-mongoalchemy
flask-mongoalchemy copied to clipboard
Support remove queries
Add support to remove queries
We can do on normal query:
Person.query.filter({'first_name' : 'John'}).remove_all()
I tried with: Person.query.filter({'first_name' : 'John'}).remove_all()
But get following error message: TypeError: remove_all() takes at least 2 arguments (1 given)
What am I missing here? Thanks!
@zqkou it looks like mongoalchemy now requires a qfield on remove_all. A qfield is an instance of mongoalchemy.QueryField: http://www.mongoalchemy.org/api/expressions/update_expressions.html#mongoalchemy.update_expression.UpdateExpression.remove_all
I'm not very familiar with the recent versions of mongoalchemy, but I can try to dig this up later. I'll reopen this issue.