Frage

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?

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top