Re: Antw: Core Data PersistentStore woes with SQLite
Re: Antw: Core Data PersistentStore woes with SQLite
- Subject: Re: Antw: Core Data PersistentStore woes with SQLite
- From: mmalc crawford <email@hidden>
- Date: Wed, 15 Nov 2006 22:59:10 -0800
On Nov 15, 2006, at 11:51 AM, Elise van Looij wrote:
Right, I see your point. It is nice to finally have things spelled
out. I have googled myself silly for the past weeks looking for any
scraps of information on Core Data and nowhere does it say:
"Warning! Before you change your persistent store from
NSXMLStoreType to NSSQLiteStoreType, be advised that you won't be
able to make a single change to your data model because if you do
you'll get a NSRunloop "no such column" error and your application
won't work anymore."
<http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdVersioning.html
>
"Core Data stores are conceptually bound to the managed object model
used to create them: since a model describes the structure of the
data, changing a model will render it incompatible with (and so unable
to open) the stores it previously created. If you change your schema,
you therefore need to migrate the data in existing stores to new
version."
There's also:
<http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdFAQ.html#//apple_ref/doc/uid/TP40001802-243775
>
I changed my model—why can't I open old files? How do I support
versioning?
Mapping data from one schema to another is a difficult problem to
solve, and Core Data does not provide a generic solution—you must
perform the transformation yourself. See "Versioning" for an overview
of the techniques you can use and the CoreRecipes code sample for a
complete example of data migration.
The fact that the XML store allows some laxity is not a "supported
feature", and should not be relied upon.
mmalc
_______________________________________________
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