Re: many-to-many query question
Subject : Re: many-to-many query question
From: Lachlan Deck <email@hidden >
Date: Fri, 26 Oct 2007 11:29:55 +1000
Delivered-to: email@hidden
Delivered-to: email@hidden
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:in-reply-to:references:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer; bh=SNzur9iN+RP+3qqa9jSi4fO38Jzrgea/UiBps7bmT5o=; b=l867SR8eo9VGU2b+Rf0qaghzFVAdHQ1+DtDd+ytgGf75OH3DRI/PIMuOCtXke6UkPigQN/kkdEKoeaJ9RQUOfYTO1hCc8w2tCHfGS1XspAKMpmD3uhKm9E7usfWPANdYKnJoxcAuXv+H8Tl0Gg58ZEf4QeR1mR0stgwXHM4pixQ=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:in-reply-to:references:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer; b=NzzNS8TLDob4UuuHXqmJ3HcJZNsPijj6S23aW0h1gnJrJvMaE86xL4wHiPdkV4xN40BQqfOcjc6rJm+YvZRcYOyHA/8NyzxmhzPbNX+2JEu41WT1ereihbwkCDslD0OAbCnYip7SQBZtLDLVQF45vCdU4ihjFYiyn7s2TJvfR/k=
On 26/10/2007, at 10:40 AM, James Cicenia wrote:
I have a many-to-many relationship as such:
Portfolio --->>MetricGroups--->>MetricItems<----project_item----
>Project
How I can create a query where
project can have ( Items(a) OR Items(b) ) AND (Items(c))
Something like this...
NSMutableArray itemsAQuals = new NSMutableArray();
String keyPathToA = "blah.blah";
for ( Item a : itemsA ) {
itemsAQuals.addObject( new EOKeyValueQualifier( keyPathToA,
EOQualifier.QualifierOperatorContains, a ) );
}
etc...
EOQualifier q = new EOAndQualifier( new NSArray( new Object[] {
new EOOrQualifier(new NSArray(new Object[] {
new EOAndQualifier( itemsAQuals ),
new EOAndQualifier( itemsBQuals )
} ) ),
new EOAndQualifier( itemsCQuals )
} ) );
with regards,
--
Lachlan Deck
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/email@hidden
This email sent to email@hidden
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.