> To do it as one fetch you can set your predicate (or a sub predicate) > as: [NSPredicate predicateWithFormat:@"%K in %@", primaryKey, keys] where > primaryKey is the name of your ID property, and keys is an array of ID > values which are "interesting" (as defined by the rest of your code). >
Thanks for this. Any idea how efficient this is? Currently I keep a dictionary of my objects which is keyed on the "interestingField" (a UUID). To gather a user-defined set of them I use a loop with something like: for (NSString* uuidString in mySetOfUUIDS) [collectedArray addObject:[dict objectForKey:uuidString]]; I wonder how fast each would be if I were collecting 500 out of 5000 objects? _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com