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

ArrayProperty does not support kind of "contains" filter #284

Closed
slava-poddubsky opened this issue Nov 14, 2017 · 3 comments
Closed

ArrayProperty does not support kind of "contains" filter #284

slava-poddubsky opened this issue Nov 14, 2017 · 3 comments

Comments

@slava-poddubsky
Copy link

slava-poddubsky commented Nov 14, 2017

Model example:

from neomodel.core import StructuredNode
class User(StructuredNode):
    permissions = ArrayProperty(StringProperty(choices=['view', 'add', 'edit', 'delete']), required=True)

User.nodes.filter(permissions__icontains=['add', 'edit'])

Any ideas?

@adamdelman
Copy link

This should probably work something like this:

WHERE single(x IN n.permissions WHERE x IN ['add', 'edit'])
RETURN n;

or

MATCH (n) 
WHERE any(x IN n.permissions WHERE x IN ['add', 'edit'])
RETURN n;

@greydot
Copy link

greydot commented May 15, 2019

Any updates on this?

@mariusconjeaud
Copy link
Collaborator

Check #820

@mariusconjeaud mariusconjeaud closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2024
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

5 participants