<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">Edson Tirelli-3 wrote:</div><div class="im">
><br>
> Also, remember you can negate operators:<br>
> Parent( collection contains $child )<br>
> Parent( collection not contains $child )<br>
> That is more efficient than composing "exists"/"not" and "from".<br>
><br>
<br>
</div>True, but "children not contains $child" expects to have the Child bound in<br>
a previous condition, implying (to my understanding) that "a" child must be<br>
present to match the condition, while this might not and, in my rule,<br>
mustn't be the case at all.<br><br></blockquote><div><br></div><div> Correct. The way to represent that scenario without using "from" is to write it like this:</div><div><br></div><div><br></div><div>not( </div>
<div> $child : Child( name == "bob" )</div><div> $parent : Parent( children contains $child ) </div><div>)</div><div><br></div><div> Edson</div></div>