Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetchPrevious option cannot prevent fetching of the previous documents #259

Open
baryshok opened this issue Nov 28, 2019 · 1 comment
Open
Labels

Comments

@baryshok
Copy link

According to the documentation of an .after.update hook:

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:

docs = CollectionHooks.getDocs.call(this, instance, selector, options).fetch()

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!

@mfen
Copy link

mfen commented Jan 9, 2023

Hit this unexpected and potentially expensive pre-fetch as well via cult-of-coders:grapher links; related issue: Meteor-Community-Packages/denormalize#33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

3 participants