[CodeData] Generic model migration code?
[CodeData] Generic model migration code?
- Subject: [CodeData] Generic model migration code?
- From: Kaspar Fischer <email@hidden>
- Date: Fri, 8 Sep 2006 11:28:22 +0200
Hi everybody,
I am often confronted with the following situation: I extend my
application's CoreData model in order to add new functionality
to the app. Here "extend" means that I don't change existing
attributes or relationships but merely ADD new ones. -- As we
know, CoreData does not "support" this. 1)
I have two questions:
- Does anybody have a generic piece of code that takes ANY pair
of old model and new model with the assumption that the latter
extends the former, and converts a data store in the old
model to one from the new model?
- In this particular situation (adding and not changing attributes)
it seems (see bottom of 2)) that the problem can be solved by
saving as XML and then reopening as a store of the new model.
Is this safe to do in the production environment?
Thanks,
Kaspar
1) http://www.cocoabuilder.com/archive/message/cocoa/2005/5/6/135088
2) http://www.cocoabuilder.com/archive/message/cocoa/2005/5/7/135167
_______________________________________________
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