Re: Core Data or not
Re: Core Data or not
- Subject: Re: Core Data or not
- From: Trygve Inda <email@hidden>
- Date: Sat, 06 Aug 2016 12:04:43 -0700
- Thread-topic: Core Data or not
> 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 (email@hidden)
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:
This email sent to email@hidden