Meteor-Community-Packages / meteor-collection-hooks

Meteor Collection Hooks
https://atmospherejs.com/matb33/collection-hooks
MIT License
657 stars 92 forks source link

Make it possible to replace cursor/doc in after find/findOne #64

Closed zimme closed 9 years ago

zimme commented 10 years ago

Should resolve #63 as you can use this.cursor/this.doc to replace the cursor/doc in after hooks

zimme commented 10 years ago

Please test that this works before merging, didn't have time to test the code

matb33 commented 10 years ago

Did you test in your code with the decryption etc?

Edit: oops I mixed people... And see that you already asked Tim to test, thank you!

zimme commented 10 years ago

I only did this with after find/findOne hooks. I don't know if there's a need for this in some of the other hooks?

I know it's not necessary in remove and update as those ops only return the affected rows

zimme commented 10 years ago

I don't see a need to replace the whole doc on find/findOne but maybe this should be added anyways to make it possible if the need arises?

zimme commented 9 years ago

Should I close this PR? I'm in no need of this functionality but I don't know it there will be others running into the same kind of problems Tim had.