Do it, learn it, get familiar with it, build your libraries so you can do it in 
more complicated cases much easier.

Use this as an opportunity to get used to Core Data, if you're not already.

Create a fork of your project in another branch and flesh out a Core Data 
version to see what it's like.

It's a perfect and low cost opportunity to gain competence in CD if you don't 
have it already.


On Aug 6, 2016, at 1:13 PM, Ryan Dignard wrote:

> 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).
> 
> On Sat, Aug 6, 2016 at 9:13 AM, Trygve Inda <cocoa...@xericdesign.com>
> wrote:
> 
>>> On Aug 6, 2016, at 1:46 AM, Trygve Inda <cocoa...@xericdesign.com>
>> wrote:
>>>> For example, I would need to add items with ID# 204, 765, 983, 124, and
>> 458
>>>> to the array. This seems like with Core Data it would be 5 different
>>>> fetches. Or is there some efficient way to fetch these 5 items in one
>>>> request?
>>> 
>>> You could add an entity to your data model that represents the custom
>>> collection.  It would have an attribute that is a one-to-many
>> relationship to
>>> InterestingObject.  If you only have one of those manually-constructed
>> tables,
>>> your data store would only contain one instance of this entity.  That's
>>> perfectly okay.
>>> 
>>> --Andy
>>> 
>>> 
>> 
>> I can't do that at run time though. I need the user to be able to build
>> custom collections (like a custom iTunes playlist) that is a subset of the
>> full collection but not by any simple predicate criteria.
>> 
>> 
>> 
>> _______________________________________________
>> 
>> 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/
>> conceptuallyflawed%40gmail.com
>> 
>> This email sent to conceptuallyfla...@gmail.com
>> 
> _______________________________________________
> 
> 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/zav%40mac.com
> 
> This email sent to z...@mac.com


_______________________________________________

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

Reply via email to