A possibly simpler way to do custom Core Data migration
A possibly simpler way to do custom Core Data migration
- Subject: A possibly simpler way to do custom Core Data migration
- From: Yi Lin <email@hidden>
- Date: Sun, 23 Feb 2014 01:07:39 -0800
I am changing the model of my Core Data app in a big way for the next
update, and custom migration is definitely needed. After reading Apple's
docs on migration policy subclasses, I find it very convoluted and wondered
if there is an easier way. I am thinking, why not just bring up the data in
the old context/model, and bring up a blank context with the new model, and
copy object one by one into the new context/model and perform any needed
logic in between? This way, I can even make use of logic in my
NSManagedObject subclasses to construct data in the new model instead of
working with the complex mechanism in migration policy. Has anyone tried
something like this with any success?
Yi
_______________________________________________
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