• 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
Re: A CoreData Limitation?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A CoreData Limitation?


  • Subject: Re: A CoreData Limitation?
  • From: Bill Bumgarner <email@hidden>
  • Date: Wed, 18 May 2005 09:12:16 -0700

On May 18, 2005, at 9:00 AM, Raffael Cavallaro wrote:

... interesting stuff snipped ...

Of course, this is not the target application for Cocoa or Core Data. End user GUI apps do not need to run continuously, nor is it a disaster to require an application restart once in a while (such as a version upgrade). So you should probably resign yourself to doing data model changes as intended - by recompiling and restarting your application, and writing any custom user data migration tools (such as importers for previous versions of saved files) as needed.

You can always load a previous version of your model and, before using it, walk the model and edit all entities such that they no longer use custom classes -- such that all entities are instantiated as NSManagedObjects.    Then you can use this model to load all of the data from the old store and populate a new store/psc using your new model.

This avoids the need to have two versions of the same class in the same runtime (or the need to rename your model classes with each conflicting update to the model).

The bottom line -- and I think this is something that people are losing site of -- is that the model should not change frequently outside of the development environment.   If you are mutating models on the fly and you aren't creating an application specifically chartered to be creating models, then your model does not sufficiently describe your application's data.

b.bum
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: A CoreData Limitation?
      • From: Raffael Cavallaro <email@hidden>
References: 
 >Re: A CoreData Limitation? (From: Bill Bumgarner <email@hidden>)
 >Re: A CoreData Limitation? (From: Arthur Schuster <email@hidden>)
 >Re: A CoreData Limitation? (From: Raffael Cavallaro <email@hidden>)

  • Prev by Date: Re: CoreData issue when updating a file format
  • Next by Date: Re: Loading already scaled JPEGs
  • Previous by thread: Re: A CoreData Limitation?
  • Next by thread: Re: A CoreData Limitation?
  • Index(es):
    • Date
    • Thread