Skip to content

Search filter for null values #70

@theofidry

Description

@theofidry

One request often made when filtering a collection by values is the case of the null value. Sadly this is a very painful case because the value retrieved on the server side is always a string and that it's no possible with the current implementation to pass an empty value.

Unfortunately I didn't find much on the subject aside from this post which suggest a "hacky" solution: defining custom values.

I tested a little bit with a StrongLoop application and the following query ?filter[where][property]=null works whatever the type of the value is.

The only problem is for string values. Indeed it becomes impossible to search for a string with the value "null".

@dunglas, @sroze what are your though on this case? Should we do as StrongLoop which has the drawback of disabling the search filter for string properties of value "null"?

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