Re: CoreData issue when updating a file format
Re: CoreData issue when updating a file format
- Subject: Re: CoreData issue when updating a file format
- From: John Timmer <email@hidden>
- Date: Fri, 06 May 2005 17:27:28 -0400
>>> I'm trying to open a CoreData/SQLite document which was saved with
>>> a v1 model. I'm getting an error, while it is working fine with
>>> the XML data store (which automatically adds the needed columns
>>> for the v2 model).
>>
>> File formats are not backwards compatible. If you change the
>> schema (model), you cannot read old files.
In the developer builds, the file would read without error, but the objects
where you've changed the model would have what I'd describe as "undocumented
behavior". My solution was to have a "fileVersion" object that doesn't
change between versions. Load it up, and check the version - if it's not
your current one, you can reload the file using your previous object model
(which you need to have saved and built into the project) and then do an
object-by-object conversion.
Haven't tried this with the release version, though.
JT
_______________________________________________
This mind intentionally left blank
_______________________________________________
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