문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top