I found this question about checking that no outgoing relationships of a given label exist on a node, and this one for checking the count of outgoing relationships with a given property, but what I need to do is get the nodes which don't have a relationship for which a given property is set. I'm sure I'm making this more difficult for myself!
What I have so far is this:
MATCH (n:Node)-[r:WEIGHTING]->()
WHERE NOT(ANY(rel IN r WHERE EXISTS(r.PROP)))
RETURN z
But, obviously, the r
at this point is a single relationship, not the collection of relationships. I think I need to get a WITH
clause involved, but I'm very much out of my depth!
How would I go about getting the set of Node
s which have no outgoing WEIGHTING
relationships that have a PROP
property?
I hope that's enough detail - sorry if it's unclear!
Thanks very much, Tom