Skip to content

Resource definition filter callback for primary resource is not called on secondary endpoint #819

Closed
@bart-degreed

Description

@bart-degreed

Primary use case is support for soft deletes.

For example, assume resources Blog and Article have an IsDeleted json:api attribute and their resource definitions override OnApplyFilter, which returns "equals(IsDeleted,'false')", or ANDs that with any existing incoming filter.

The bug is that for /blogs/1/articles, BlogResourceContext.OnApplyFilter is not called. So if blog 1 was soft-deleted, this incorrectly returns its articles.

The same problem applies to .../relationships/... requests.

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