Skip to content

fetchPrevious option cannot prevent fetching of the previous documents #259

@baryshok

Description

@baryshok

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions