-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
[server] Does MyCollection.direct.update call MyCollection.update? #73
Comments
Ah interesting point, you're right, and it's because of: https://github.com/matb33/meteor-collection-hooks/blob/master/collection-hooks.js#L50 I suspect to make this work properly would involve making sure that |
That looks like it! I meant to say Looks like you went out of your way to make the server extend the underlying |
Nope... don't remember, but it was for a good reason. I looked briefly and couldn't recall... |
Dug a little more, and it looks like Commit where you changed to that logic: Original commit with the Oh well, at least you can get around it by passing |
I believe that logic is important for firing server-defined hooks after allow/deny has been processed. |
Great improvement. Thanks for this! |
…exceptions * commit '7a96ab397710ad69592033f222b8481cd2dd3db9': update History and bump version to 0.7.11 leverage the original constructor to accomplish direct operations, fixes Meteor-Community-Packages#89 and most likely Meteor-Community-Packages#90 wip slight change to test logic for direct update and remove by string id to be certain we aren't reusing the collection from the test above it update api.versionsFrom to 1.0.3 and add tests to verify that direct update and remove work using the string _id update version and history attempt to prevent cfs tests from running on travis add collectionfs tests update history for 0.7.8 change approach for direct to allow the advices to choose how to suppress the hooks, which allows us to have consistent return values -- fixes Meteor-Community-Packages#73 and Meteor-Community-Packages#86 - re-add api.versionsFrom, it is needed... oops - remove unused bind polyfill - merge issue67 branch, which tests the collection hooks firing properly in a tight loop - remove api.versionsFrom(0.9.1), this is not necessary change _wrapAsync to wrapAsync add test for hooks in tight loop Conflicts: insert.js remove.js update.js
Or does it skip straight to the Mongo driver's update function?
When I try to update a document by _id, using:
I get the server-side error:
which to me looks like a Mongo driver error. I expected it to call the Meteor Collection.update function directly, which would allow me to pass the ID instead of a selector object.
The text was updated successfully, but these errors were encountered: