Question

I need to find all nodes connected with relation that has attribute fld = email. Neo4j Cypher complains the following as a query with bad syntax:

MATCH (n)-[r:rel*..]-(m) WHERE has(r.fld) and r.fld='email' RETURN n,r,m

What would be the right one?

Était-ce utile?

La solution

Best bet:

MATCH (n)-[r:rel {fld: 'email'}]-(m) RETURN n, r, m;

This should match nodes that are connected with a "rel" relationship that has a property "fld" with the value "email".

HTH

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top