meteor-collection-hooks
meteor-collection-hooks copied to clipboard
Meteor Collection Hooks
I have this hook defined: ``` DealsCollection.before.insert(function (userId, doc) { console.log(doc); if (doc.priceDetails.startDate) { doc.priceDetails.startDateUTC = Meteor.call("makeUtcDate", doc.priceDetails.startDate); } }); ``` It never fires. I have `DealsCollection.after.insert` that fires just...
Hello, First, thanks for a great plugin! Now to the problem: When I run a `$pull` command in mongodb, a strange thing happens. It calls my .update collection hook twice....
I want to change the _id of a document in a before.insert hook. The document with the changed id is correctly inserted into the collection, but the return value of...
While trying to do a direct.update for a field in a document in a collection hook, I get an error in the console saying that check() was not called on...
See CollectionFS/Meteor-CollectionFS#146. The upshot is that the new rendering engine requires that a doc being transformed must already have an `_id` property. It seems as though calling `this.transform()` within a...
Is there currently a way to run some specific hook or set of hooks on demand? Say I have a set of before update hooks on a collection. Most of...
After a user is created, I want the client's `Accounts.createUser` call to return, and then I want to add something to the user's record that is fetched with a HTTP...
This is now a feature request at meteor/meteor#395. Please throw your support in that thread, as integration would bring a whole range of benefits: - A lot better support for...
For example this code cannot works with an async callback without any "await" keyword. We are not able to cancel updates (nor inserts or deletes) by returning false. Can you...
I started working on this since I was stuck when updating grapher (PR: https://github.com/cult-of-coders/grapher/pull/484) I have one test failing right now for Meteor v3. I'll also have to test with...