Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-06-2019 01:09 AM
Need little help with Cypher. My Cypher is,
MATCH p=(user)-[r1:roles]->(role1:`Role`)-[:include*1..]->(role2:`Role`)
RETURN collect(tail(relationships(p))), collect(role2)
For a path where include
relation is more than 1 level deep, it gives all include
relations for that path as array with corresponding role2
. Where as I want just the last relationship and the respective node.
Thanks.
Solved! Go to Solution.
05-06-2019 05:47 AM
Got the answer
RETURN collect(last(relationships(p))), collect(role2)
Thanks.
05-06-2019 05:47 AM
Got the answer
RETURN collect(last(relationships(p))), collect(role2)
Thanks.
All the sessions of the conference are now available online