Skip to content

asFindQuery() returns wrong builder for patchAndFetchById() operations #1855

@lehni

Description

@lehni

I am using asFindQuery() to get the affected items in a static beforeUpdate() model hook that gets called when patchAndFetchById() is executed.

In this situation, asFindQuery() does not return a query that only selects the affected model items, it returns a query without a where clause, returning all model items of the given model class.

According to the docs, it should only return the model item with the given id?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions