Meteor-Community-Packages / meteor-collection-hooks

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

Question : LocalCollection._modify reverse ? #197

Closed chneau closed 8 years ago

chneau commented 8 years ago

Hello,

I struggle with creating a good denormalization of data on an array. Is there a way to modify the "doc" we receive on before.update, modify this doc and create a modifier from this doc (compared to the initial doc) ? Something like getModifiers(initialDoc,editedDoc) will return a modifier with $set and $unset if needed... I'm just asking since I didn't knew the fabulous existence of LocalCollection._modify, maybe some of you will tell me "yeah it's this command !".

Regards, Charles