Am Freitag, 27. Juli 2012 09:05:26 UTC+2 schrieb vmarcinko:
Hello,
I've been struggling to solve this cypher query, if possible at all.
I want to return final nodes (finalNode) from my cypher query. And there are 2 ways one can find final nodes in db:
startNode <-[:r1]-finalNode
(when finalNode is directly connected to startNode)
...and...
startNode -[:r2*]->middleNode-[:r3]->finalNode
(when finalNode is connected to middleNode, and this one is connected directly to startNode or to "parent" middleNode)
Both of these queries return finalNodes correctly, but I dunno how to connect them together for purpose of returning final nodes regardless in which way they are connected to start node.
I tried connecting tha match portion with comma, but it doesn't work :
start startNode = node(3131) match startNode <-[:r1]-finalNode , startNode -[:r2*]->middleNode-[:r3]->finalNode return finalNode
Any help?
regards,
Vjeran