Closed jonlachlan closed 8 years ago
To be fair, this is what Meteor also does: https://github.com/meteor/meteor/blob/abd574f38008b45f5e2a6bc322b10bcdde44763a/packages/mongo/collection.js#L144
Yep, that's totally fair, and I don't have a problem with the behavior, I just think it should be documented, especially in the context of running hooks which could have side effects. In vanilla Meteor/Mongo, how it is implemented makes no difference to me as a developer, but in this context it was a pitfall.
I had no idea that
findOne
hook ran when performing anupdate
. It was not at all apparent to me thatfindOne
would be involved withupdate
. I think it would make sense to indicate this in the docs.