Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
03-22-2022 02:43 AM
I am using the cypher
</>match (n:NodeEntity)
where not (n)<--(:NodeEntity)
return n</>
But this is also returning nodes which have a parent relationship..
03-22-2022 04:35 AM
I think you specified an inbound relationship when you should be using an outbound relationship for a parent
where not (n)<--(:NodeEntity)
This is the right way to express this, but this will return tree leaves not parents. Try reversing the arrow direction
03-22-2022 09:52 AM
Assuming data as follows:
The following query worked:
match(n:NodeEntity)
where not exists ((:NodeEntity)-->(n))
return n
if your relationships are in the other direction, flip the direction in the where pattern predicate, as @david.allen suggests.
All the sessions of the conference are now available online