I have the following Cypher query which works fine:
MATCH (c:Company)-[r:CONTAINS]->(e) WHERE r.associationType='COMPOSITION' return c, e
Now, I'd like to go down to the unlimited depth with [r:CONTAINS]
relationship and return all of the nodes, something like this:
MATCH (c:Company)-[r:CONTAINS*]->(e) WHERE r.associationType='COMPOSITION' return c, e
I added *
there, but right now the query fails with the following error:
Type mismatch: expected Map, Node, Relationship, Point, Duration, Date, Time, LocalTime, LocalDateTime or DateTime but was List (line 1, column 44 (offset: 43))
"MATCH (c:Company)-[r:CONTAINS*]->(e) WHERE r.associationType='COMPOSITION' return c, e"
What am I doing wrong and how to properly implement such query? Thanks!