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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/aswift%40apple.com

This email sent to [EMAIL PROTECTED]

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to