• 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: CoreData issue when updating a file format
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: CoreData issue when updating a file format (From: Jim Correia <email@hidden>)

  • Prev by Date: Re: to NSTask or not to NSTask
  • Next by Date: Bindings: inspector w/bindings?
  • Previous by thread: Re: CoreData issue when updating a file format
  • Next by thread: Re: CoreData issue when updating a file format
  • Index(es):
    • Date
    • Thread