• 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
NSPredicate and NOT IN and array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSPredicate and NOT IN and array


  • Subject: NSPredicate and NOT IN and array
  • From: David Alter <email@hidden>
  • Date: Tue, 23 May 2006 15:00:54 -0700

I would like to get an array of items that are NOT IN and array. Is there a way to do this with a NSPredicate

Example:

NSArray *listOfIDs = [self getSomeIDs];
NSFetchRequest *fetchRequest = [[[NSFetchRequest alloc] init] autorelease];
[fetchRequest setEntity:
[NSEntityDescription entityForName:@"items"
inManagedObjectContext:myMOC ] ];
[fetchRequest setPredicate: [NSPredicate predicateWithFormat: @"(id NOT IN %@)", listOfIDs]];

Any ideas would be great.


thanks
-dave


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: NSPredicate and NOT IN and array
      • From: Greg Herlihy <email@hidden>
  • Prev by Date: IB: subclassing NSAnimation problem
  • Next by Date: iTunes user rating
  • Previous by thread: Re: IB: subclassing NSAnimation problem
  • Next by thread: Re: NSPredicate and NOT IN and array
  • Index(es):
    • Date
    • Thread