Open baryshok opened 4 years ago
According to the documentation of an .after.update hook:
.after.update
The optional fetchPrevious option, when set to false, will not fetch documents before running the hooks.
But really the documents are fetched anyway regardless of this option set to false. It happens here: https://github.com/Meteor-Community-Packages/meteor-collection-hooks/blob/1c4de620b00825f933410f1ce1eb059f73e10f74/update.js#L24 The documents are fetched to get their ids that are later used in the .after.update hook. I don't see an easy way to make the option work as it should. So I believe it needs a proper description in the documentation. Because currently both the name of the option and its description are misleading. Thanks!
Hit this unexpected and potentially expensive pre-fetch as well via cult-of-coders:grapher links; related issue: https://github.com/Meteor-Community-Packages/denormalize/issues/33
According to the documentation of an
.after.update
hook:But really the documents are fetched anyway regardless of this option set to false. It happens here: https://github.com/Meteor-Community-Packages/meteor-collection-hooks/blob/1c4de620b00825f933410f1ce1eb059f73e10f74/update.js#L24 The documents are fetched to get their ids that are later used in the
.after.update
hook. I don't see an easy way to make the option work as it should. So I believe it needs a proper description in the documentation. Because currently both the name of the option and its description are misleading. Thanks!