cypher - Left join in Neo4j does not seem to work -


this graph enter image description here

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. enter image description here

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

Popular posts from this blog

xslt - Substring before throwing error -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

oracle - Changing start date for system jobs related to automatic statistics collections in 11g -