What's a cypher query to find a node where a property doesn't exist? 2 nodes: A = {foo: true, name: 'A'}, B = { name: 'B'}
need to find B because it doesn't have foo, i.e. B.foo is not set
What's a cypher query to find a node where a property doesn't exist? 2 nodes: A = {foo: true, name: 'A'}, B = { name: 'B'}
need to find B because it doesn't have foo, i.e. B.foo is not set
As Michael Hunger mentioned
MATCH (n) WHERE NOT EXISTS(n.foo) RETURN n
On older versions of Neo4j you can use HAS:
# Causes error with later versions of Neo4j
MATCH (n) WHERE NOT HAS(n.foo) RETURN n
MATCH (f) WHERE f.foo IS NULL RETURN f