• 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
Core Data: Specifying latest .mom resource. Was: NSMigratePersistentStoresAutomaticallyOption...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data: Specifying latest .mom resource. Was: NSMigratePersistentStoresAutomaticallyOption...


  • Subject: Core Data: Specifying latest .mom resource. Was: NSMigratePersistentStoresAutomaticallyOption...
  • From: Jerry Krinock <email@hidden>
  • Date: Mon, 23 Nov 2009 22:55:43 -0800

Sorry, I'm back with this problem.  Although the code I posted worked perfectly in a Debug build, when I tested a Release build, the invocation of -mergedModelFromBundles: raised this exception :

   Can't merge models with two different entities named 'Ixternalizer_entity'

Apparently if you've got new and old version .mom files in a bundle, of course there are going to be conflicts, and it seems that in my Debug build Core Data has some way of figuring out which is the latest and merging them.  But in my Release build it doesn't work.

So, instead of using -mergedModelFromBundles:, I got the bundle resource path, appended the hard-coded .momd path, appended the hard-coded name of the *latest* .mom file, created a URL, and then created PSC using -initWithContentsOfURL:

I'm not posting the code because it is disgusting.  There must be a trick to tell Core Data to "just use the latest mom file".  What is it?

Sincerely,

Jerry Krinock

_______________________________________________

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: Core Data: Specifying latest .mom resource. Was: NSMigratePersistentStoresAutomaticallyOption...
      • From: glenn andreas <email@hidden>
References: 
 >Core Data: Simply set NSMigratePersistentStoresAutomaticallyOption in a Document? (From: Jerry Krinock <email@hidden>)
 >Re: Core Data: Simply set NSMigratePersistentStoresAutomaticallyOption in a Document? (From: Matthew Lindfield Seager <email@hidden>)
 >Re: Core Data: Simply set NSMigratePersistentStoresAutomaticallyOption in a Document? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: [Moderator] Re: [OT] Re: A question of legality...
  • Next by Date: Re: Problem on NSPopUpButton Class
  • Previous by thread: Re: Core Data: Simply set NSMigratePersistentStoresAutomaticallyOption in a Document?
  • Next by thread: Re: Core Data: Specifying latest .mom resource. Was: NSMigratePersistentStoresAutomaticallyOption...
  • Index(es):
    • Date
    • Thread