<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">
&gt;<br>
&gt;     Also, remember you can negate operators:<br>
&gt; Parent( collection contains $child )<br>
&gt; Parent( collection not contains $child )<br>
&gt;     That is more efficient than composing &quot;exists&quot;/&quot;not&quot; and &quot;from&quot;.<br>
&gt;<br>
<br>
</div>True, but &quot;children not contains $child&quot; expects to have the Child bound in<br>
a previous condition, implying (to my understanding) that &quot;a&quot; child must be<br>
present to match the condition, while this might not and, in my rule,<br>
mustn&#39;t be the case at all.<br><br></blockquote><div><br></div><div>    Correct. The way to represent that scenario without using &quot;from&quot; is to write it like this:</div><div><br></div><div><br></div><div>not( </div>
<div>    $child : Child( name == &quot;bob&quot; )</div><div>    $parent : Parent( children contains $child ) </div><div>)</div><div><br></div><div>    Edson</div></div>