Re: EOOrQualifier / EOAndQualifier
Lachlan Deck <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi there,
On 26/08/2006, at 10:54 PM, WILLIAM GARNETT wrote:
> I am trying to make up a qualifier such as:
>
> (Spec1 OR (Spec2 AND Spec3))
>
> I tried an EOOrqualifier made up of 2 qualifiers:
> - Spec1
> - Spec2 AND Spec3
>
> But it seemed to just evaluate the first half of Spec2 AND Spec3;
> in other words it ends up evaluating Spec1 OR Spec2, but ignoring
> Spec3.
Spec3 will not be evaluated if Spec2 fails. That's what the AND means.
You're wanting something like the following:
EOQualifier spec1; // assume initialised
EOQualifier spec2; // assume initialised
EOQualifier spec3; // assume initialised
EOQualifier resultingQualifier;
resultingQualifier = new EOOrQualifier( new NSArray( new Object[] {
spec1,
new EOAndQualifier( new NSArray( new Object[] {
spec2, spec3
} ) )
} ) );
with regards,
--
Lachlan Deck