Closed drewmoore closed 8 years ago
This is because of how the update hook works: it first grabs all relevant documents with the find hook then updates them one by one. This is the only way it can be called for all updated documents.
I don't think there's a way to get around this behavior, except making your find hook a little smarter. I actually take advantage of it in https://github.com/mizzao/meteor-partitioner.
Yeah, I ended up writing my own implementation of something similar to this package just for customizing. Thanks, though, this package has some cool stuff going on.
I have found that when assigning both "find" and "update" hooks for a collection that update is always overwritten by the find hook. It seems to only be a problem with update. Other methods are unaffected. I'm also using collection2, autoform, and simpleSchema if that helps at all. Here's an actual code snippet: