title: Cypher: Issue with replacement for ! property operator
body: <p>I just saw (here: <a href="http://docs.neo4j.org/chunked/1.9/deprecations.html" rel="nofollow">http://docs.neo4j.org/chunked/1.9/deprecations.html</a>) that the ! operator for Cypher property expressions will be deprecated with the release of Neo4j 2.0. So I went to reformulate my existing Cypher queries and ran into the following problem.</p>
  
  <p>1.9 query:
  <code>START n=node(*) WHERE NOT "NO_FACET" in n.uniqueLabels! RETURN n limit 2;</code></p>
  
  <p>What I get: Nodes which either don't have the "uniqueLabels" property at all OR nodes that have this property but do not contain the "NO_FACET" value.</p>
  
  <p>The page linked above says to circumvent such expressions by doing a check like <code>has(n.uniqueLabels" AND NOT "NO_FACET" IN n.uniqueLabels</code>. This query works, but it is obviously not what I wanted (I also wanted nodes back that don't have the property at all).
  The proposed circumvention looks like a lazy AND-evaluation which would be fine to me. So I did this:</p>
  
  <p><code>START n=node(*) WHERE NOT (has(n.uniqueLabels) AND "NO_FACET" in n.uniqueLabels) RETURN n limit 2;</code> </p>
  
  <p>But here I get an error:
  <code>==> EntityNotFoundException: The property 'uniqueLabels' does not exist on Node[0]</code>
  So the evaluation is not so lazy after all? The weird thing, this query works:</p>
  
  <p><code>START n=node(*) WHERE has(n.uniqueLabels) AND "NO_FACET" in n.uniqueLabels RETURN n limit 2;</code></p>
  
  <p>It just gives me the exact opposite of what I wanted, of course.</p>
  
  <p>Actually I can get what I want without the operator like this:</p>
  
  <p><code>START n=node(*) WHERE NOT has(n.uniqueLabels) OR (has(n.uniqueLabels) AND NOT "NO_FACET" in n.uniqueLabels) RETURN n limit 2; </code></p>
  
  <p>But I'm not sure if this is how it was intended when the operator was deprecated. So the question is whether I miss the right way to do it or if the behavior of AND in conjunction with a NOT outside the parentheses is a bug perhaps?</p>
  
  <p>And by the way: Does anyone now why the ! operator has been deprecated in the first place? I like it ;-)</p>
  
  <p>Thank you for reading and best regards!</p>