Re: Core Data Versioning - more than two versions, how to map upgrades?
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