• 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
Re: How do I add additional Attributes to a Core Data Entity?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I add additional Attributes to a Core Data Entity?


  • Subject: Re: How do I add additional Attributes to a Core Data Entity?
  • From: Isaac Csandl <email@hidden>
  • Date: Thu, 21 Jul 2005 13:35:32 -0500

This is kind of a long shot, and may only work for Document-based Core Data... but it won't hurt to try... [Insert usual disclaimer about making a backup first.]

Try saving your data file as XML from the old version of your App, then open the XML file with the new version. If your data's intact, just save it as binary again.

The XML format includes the names of the attributes (seems to depend on the names, not the order), so there's a good chance your values will end up in the right place.

HTH.

On Jul 21, 2005, at 11:27 AM, Charilaos Skiadas wrote:

On Jul 21, 2005, at 11:00 AM, Andrew Sage wrote:


I have a set of Core Data Entities which each have several Attributes.
This Data Model has been used for the first version of my software and I now
have a large amount of data built around it.


The problem is that I tried to add an additional Attribute to one of the Entities and it
messed everything up. Due to the Attribute's being order by name in the Entity in the Data Model it appears that my new Attribute has gone into the middle and values loaded from file are now ending up in the wrong Attributes.


Is this meant to happen? Is there any way around this or is there some kind of
versioning that can be used to migrate data from the old model to the new one?



The CoreRecipes example at http://developer.apple.com/samplecode/ CoreRecipes/CoreRecipes.html
has a detailed example on how to migrate your data. Look under "Sample Applications/Migration". I haven't personally used it, but it seems to be what you want.



Thank you.


Haris


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40chicagolegalsearch.com


This email sent to email@hidden


_______________________________________________ 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
References: 
 >How do I add additional Attributes to a Core Data Entity? (From: Andrew Sage <email@hidden>)
 >Re: How do I add additional Attributes to a Core Data Entity? (From: Charilaos Skiadas <email@hidden>)

  • Prev by Date: Re: Missing Core Data selector
  • Next by Date: flipping the y-axis of an nsimage
  • Previous by thread: Re: How do I add additional Attributes to a Core Data Entity?
  • Next by thread: Re: How do I add additional Attributes to a Core Data Entity?
  • Index(es):
    • Date
    • Thread