NSPredicate and NOT IN and array
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