• 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
[CodeData] Generic model migration code?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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


  • Follow-Ups:
    • Re: [CodeData] Generic model migration code?
      • From: "Marcus S. Zarra" <email@hidden>
    • Re: [CodeData] Generic model migration code?
      • From: Bill Bumgarner <email@hidden>
    • Re: [CodeData] Generic model migration code?
      • From: Jakob Olesen <email@hidden>
  • Prev by Date: Re: CoreData transient attribute memory leak?
  • Next by Date: Drag and Drop in a WebView - even with no registeredDraggedTypes!?!
  • Previous by thread: Can NSPrintOperation print to multiple paper types in one job?
  • Next by thread: Re: [CodeData] Generic model migration code?
  • Index(es):
    • Date
    • Thread