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

Cannot query "collect" function #80

Closed
cotran2 opened this issue Oct 23, 2020 · 4 comments
Closed

Cannot query "collect" function #80

cotran2 opened this issue Oct 23, 2020 · 4 comments

Comments

@cotran2
Copy link

cotran2 commented Oct 23, 2020

I have no problems using neo4r for most of my queries except for those returning collect(properties) as something, the error is always Error in .x[[i]] : subscript out of bounds. I can use these queries on my neo4j server without any problems.
Could someone look into this and help me out? Much appreciated.

@cotran2 cotran2 changed the title Cannot query "collect" query Cannot query "collect" function Oct 23, 2020
@davidlrosenblum
Copy link

davidlrosenblum commented Oct 23, 2020 via email

@cotran2
Copy link
Author

cotran2 commented Oct 23, 2020

Here is the query

MATCH (r:Role)-[:ROLE_HAS_ENT_2020]->(e:Entitlement)
                WITH COLLECT(r.role) AS associated_roles
                MATCH (r:Role)-[:ROLE_HAS_ENT_%s]->(e:Entitlement)
                WHERE r.role IN associated_roles
                RETURN r.role AS rid_associated, COUNT(e.entitlement) AS n_ent, COLLECT(e.entitlement) AS eids_associated

I can run this on my neo4j server but not by using neo4r. If I remove the last part, COLLECT(e.entitlement) AS eids_associated, it runs fine with neo4r.

@davidlrosenblum
Copy link

davidlrosenblum commented Oct 23, 2020 via email

@cotran2
Copy link
Author

cotran2 commented Oct 24, 2020

Thanks a lot! This works for me!

@cotran2 cotran2 closed this as completed Oct 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants