• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Core Data or not
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data or not


  • Subject: Core Data or not
  • From: Trygve Inda <email@hidden>
  • Date: Fri, 05 Aug 2016 07:46:03 -0700
  • Thread-topic: Core Data or not

I am considering moving an app to Core Data. Currently it manages an array
of InterestingObjects. I use NSArrayControllers and TableViews. Everything
works.

I have two cases:

1. I have one array of all InterestingObjects and I set different predicates
on the array controller to show only those matching the predicate in a
table. (Think of this as an iTunes smart folder)

2. I manually insert some of the InterestingObjects into an array controller
to be shown in a table. (Think of this as an iTunes user-defined folder -
just dragging in random songs)

#1 seems easy to migrate to Core Data as the table will be bound to my
managed object context and I can use predicates to show different subsets.

How can I effectively do #2?

Each InterestingObject has an identifier that is a UUID so I could make a
predicate that just lists all the InterestingObjects I am colleting. Will
that be effective with perhaps hundreds of objects?

Without Core Data it is easy to just go through the array and pick out a
hundred, add them to a different array and display them.

Basically I have a core data store of 5,000 InterestingObjects. I have a
list of 200 UUIDs (remember, each InterestingObject has a UUID) and I need
to list these 200 InterestingObjects in a table.

In some cases I need to combine them, so how is the best way with Core Data
to show a table of:

- all the InterestingObjects where name= "Joe"
- plus all the InterestingObjects with these 200 UUIDs

I hope this is clear.

Somehow this seems easier to do without Core Data.

Thanks.



_______________________________________________

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


  • Follow-Ups:
    • Re: Core Data or not
      • From: Graham Cox <email@hidden>
    • Re: Core Data or not
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: Need some NSComboBox debugging help
  • Next by Date: How to perform CoreData deletion in the background?
  • Previous by thread: Re: Need some NSComboBox debugging help
  • Next by thread: Re: Core Data or not
  • Index(es):
    • Date
    • Thread