>
> Edson Tirelli-3 wrote:
> >
> > Also, remember you can negate operators:
> > Parent( collection contains $child )
> > Parent( collection not contains $child )
> > That is more efficient than composing "exists"/"not" and "from".
> >
>
> True, but "children not contains $child" expects to have the Child bound in
> a previous condition, implying (to my understanding) that "a" child must be
> present to match the condition, while this might not and, in my rule,
> mustn't be the case at all.
>
>
Correct. The way to represent that scenario without using "from" is to
write it like this:
not(
$child : Child( name == "bob" )
$parent : Parent( children contains $child )
)
Edson
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users