Skip to content

support filtering by (non-)existing relationships #551

Closed
@maurei

Description

@maurei

Description

In #548 support for filtering by (non)-null to one relationships was added: /children?filter[parent.id]=isnull. As discussed in that issue, ideally we would like to allow to filter without having to reference the primary key.

To that end, we want to support filtering by (non)-existing relationships by using something like this:

  1. /children?filter[parent]=isnull for to one relationships
  2. /parents?filter[children]=isnull for to many relationships

Note that when dealing with to many relationships, isnull might not be the most intuitive choice from a semantic point of view, because in C#/EF a to-many relationship is a IEnumerable which can be empty but is usually never null. For the latter we could therefore consider to introduce eg. isempty or isset, and for consistency we could use the same in the case of to one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions