• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: many-to-many query question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: many-to-many query question
      • From: Chuck Hill <email@hidden>
References: 
 >many-to-many query question (From: James Cicenia <email@hidden>)

  • Prev by Date: Re: many-to-many query question
  • Next by Date: Re: Strangeness afoot
  • Previous by thread: Re: many-to-many query question
  • Next by thread: Re: many-to-many query question
  • Index(es):
    • Date
    • Thread