Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-01-2019 12:53 PM
MATCH p=(user)-[r1:roles]->(role1:`Role`)-[:include*0..]->(role2:`Role`)
I need to get only relationships with type include
from the cypher above. Thanks.
Solved! Go to Solution.
05-02-2019 05:33 AM
You can use relationships(p)
to get the list of relationships in the path, and you can combine that with a filter to only get the ones that are of type include
:
MATCH p=(user)-[r1:roles]->(role1:`Role`)-[:include*0..]->(role2:`Role`)
WITH [rel in relationships(p) WHERE type(rel) = 'include'] as includeRels
...
05-02-2019 05:33 AM
You can use relationships(p)
to get the list of relationships in the path, and you can combine that with a filter to only get the ones that are of type include
:
MATCH p=(user)-[r1:roles]->(role1:`Role`)-[:include*0..]->(role2:`Role`)
WITH [rel in relationships(p) WHERE type(rel) = 'include'] as includeRels
...
All the sessions of the conference are now available online