Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add entity view attribute filters for collections #109

Open
beikov opened this issue Feb 28, 2015 · 0 comments
Open

Add entity view attribute filters for collections #109

beikov opened this issue Feb 28, 2015 · 0 comments

Comments

@beikov
Copy link
Member

beikov commented Feb 28, 2015

There are use cases where entity views contain a list of strings as a comma separated string (also see #104 ). What kind of filter or sorting can we support for such attributes? The currently implemented attribute filters only support scalar values.

The common filters for a collection are with one of the following quantifiers

at least one element in the collection must match the filter criterion
at least one element in the collection must match one of the filter criteria
all elements in the collection must match the filter criterion
no element may match the filter criterion

Examples

Give me all documents that have a partner whos' name starts with 'Rupp'
Give me all documents that have a partner whos' name either starts with 'Rupp' or starts with 'Kleider'
Give me all documents where every partner's name starts with 'Rupp'
Give me all documents that have no partner whos' name starts with 'Rupp'

I don't think there are any common sorting criteria one could apply for such collections.

A possible solution to the bad default problem could be to disallow applying regular filters on attributes within collections and instead force to use a dedicated EntityViewSetting API which makes the choice of "filtering the collection to a subset" vs "finding elements where the collection matches a criteria" explicit. This is required for #1498

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant