cypher - Left join in Neo4j does not seem to work -
this graph 
i trying make query tells me if connections node of type t exist nodes of type m. heard optional match equivalent sql left join, not include the missing link.
here attempt:
start t=node(241) optional match t-[r:r]->(m) return m.name, r not null and result has nodes m1, m2, m3. 
i want include row m4 | false in result.
if modify query bit
start t=node(241), m=node(246,247, 248, 249) optional match t-[r:r]->(m) return m.name, r not null then can desirable result, requires me know ids of m nodes in advance.
i felt kinda dump because found answer right after posting this.
all need match m nodes.
start t=node(241) match (m:m) optional match t-[r:r]->(m) return m.name, r not null
Comments
Post a Comment