The manuals for this give the following example: NSPredicate *inPredicate = [NSPredicate predicateWithFormat: @"attribute IN %@", aCollection];
It looks like you are missing the attribute... If attribute can vary, you can use a %K and a NSString value representing the attribute name (it is not automatically enclosed in quotes as %@ values are). HTH, Fred On May 2, 2010, at 8:27 AM, Rick Mann wrote: > Hi. > > I have two entities: Mission and Favorite. Favorite has a single relation to > Mission. I need to fetch all Mission objects that exist in Favorite. I'm > using an NSFetchResultsController. > > I created an array with all the Mission objects found in the Favorite entity. > Then I tried to create a predicate like this: > > NSPredicate* pred = [NSPredicate predicateWithFormat: @"in %@", > favoriteMissions]; > > and use that on a fetch of Mission objects. But it complains that it can't > parse that format string. > > Clearly, this approach isn't going to work. I could store the Mission's key > in the Favorite table instead, but that's less elegant. Might be the only way > to go. > > Any suggestions? > > tia, > Rick > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/freimer%40freimer.org > > This email sent to frei...@freimer.org > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com