• 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: Core Data Versioning - more than two versions, how to map upgrades?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data Versioning - more than two versions, how to map upgrades?


  • Subject: Re: Core Data Versioning - more than two versions, how to map upgrades?
  • From: Adam Swift <email@hidden>
  • Date: Wed, 20 Aug 2008 11:29:34 -0700


On Aug 12, 2008, at 7:38 PM, Graham Perks wrote:

I have model versions 1, 2, and 3, 3 being the latest.

Obviously I need a mapping file to upgrade 2 -> 3.

But for upgrades of v1, should the mapping file be 1 -> 3 direct, or 1 -> 2 and Core Data will do a two-step upgrade?

Creating a mapping from 1->3 is the best option for performance considerations, alternatively you can use a while loop that checks if the store file is an old version and applies any available mapping to get it to the next step.



The latter would be simplest, having Core Data automatically chain upgrades. Is that how it's supposed to work?

No, there isn't any support for automatic chaining. It doesn't scale particularly well.




Cheers,
Graham Perks.
http://www.asinglepixel.com
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Core Data Versioning - more than two versions, how to map upgrades? (From: Graham Perks <email@hidden>)

  • Prev by Date: Re: passing an object between views
  • Next by Date: Re: Best Way to Handle Properties?
  • Previous by thread: Core Data Versioning - more than two versions, how to map upgrades?
  • Next by thread: NSTypesetter layoutParagraphAtPoint:
  • Index(es):
    • Date
    • Thread