• 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: migrating CoreData data model doesn't work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: migrating CoreData data model doesn't work


  • Subject: Re: migrating CoreData data model doesn't work
  • From: Gustavo Pizano <email@hidden>
  • Date: Fri, 21 May 2010 13:53:28 +0200

Rainer hello.

Have you created once again the ManagedObjects from the model?.. If so and you didn't remove the old ones, Xcode will start complaining A LOT (don't ask me why but it happened to me when I did it), then I realize I had to delete the old MO .m and .h files and generate again form the new model version. Now if you have custom methods in your MO's then what I do is that I don't delete, or create a new one, but simply add by had the new(s) attributes I set in the new model version. Im pretty sure there i another way to do this, better one, but this is what I do. But generally before creating the MO's Im make sure the model its normalized as much as I can, and in a consistent representation.

Now other thing to check is if you set the new model version as the current one.

Also, I think when changing things in the model you have to create a modelmapping file, this is done after making the changes in the new model version,  new file> resources, mappingmodel, call it whatever, then select the sources and the destination models, ..

I hope this helps.

Im not expert tough, but if this helps you Im glad.

Gustavo



On 21.5.2010, at 1:25, Rainer Standke wrote:

> Hello,
>
> when I select my data model in the xcode project, and then select Design/Data Model/Add Model Version I do get a new bundle in Xcode project, but now copy of the existing datamodel. The bundle, both in Xcode and on the Finder level, is empty. The app does not compile any more.
>
> The only thing that might be unusual in this project - as far as I can tell - is that I have iVars in the ManagedObject classes that calculate some things on the fly, based on regular attributes. Could this be a reason for trouble?
>
> I have no idea why this is going wrong, and would appreciate some help, greatly.
>
> Thanks,
>
> Rainer_______________________________________________
>
> 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

_______________________________________________

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

  • Follow-Ups:
    • Re: migrating CoreData data model doesn't work
      • From: Hal Mueller <email@hidden>
References: 
 >migrating CoreData data model doesn't work (From: Rainer Standke <email@hidden>)

  • Prev by Date: Re: NSWindowController for Prefs XIB Question (Core Data involved)
  • Next by Date: NSManagedObject subclass mysteriously notifies observers for non-modeled properties
  • Previous by thread: migrating CoreData data model doesn't work
  • Next by thread: Re: migrating CoreData data model doesn't work
  • Index(es):
    • Date
    • Thread