-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Model.where({}).update().exec() not updating #3221
Comments
Try yield Model
.find()
.where('myId'),equals(id)
.update({a:'1'})
.exec() Off the top of my head I don't think Model even has a |
I am also encountering this bug. The query's |
@chazmo03 code example? |
I'm facing the same bug. Neither of these two work:
Both return
Setting 'debug' to 'true' for mongoose shows that nothing is actually executed at all. |
@testtube- try just doing |
That did the trick. Is the chained version supported at all? At least the documentation shows it as an example: http://mongoosejs.com/docs/api.html#query_Query-update |
Yep the chained version should work in theory. I'll investigate. |
Tried
and
both returns
However, the following works
The text was updated successfully, but these errors were encountered: