Meteor-Community-Packages / meteor-collection-hooks

Meteor Collection Hooks

Home Page:https://atmospherejs.com/matb33/collection-hooks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question : LocalCollection._modify reverse ?

chneau opened this issue · comments

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