Re: A CoreData Limitation?
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