• 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: 10.5 + Core Data project error?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 10.5 + Core Data project error?


  • Subject: Re: 10.5 + Core Data project error?
  • From: mmalc crawford <email@hidden>
  • Date: Wed, 31 Oct 2007 06:36:12 -0700


On Oct 31, 2007, at 6:19 AM, Alex Reynolds wrote:

I tried your suggestion:

NSArray bundleArray = [NSArray arrayWithObject:[NSBundle mainBundle]];
managedObjectModel = [[NSManagedObjectModel mergedModelFromBundles: bundleArray] retain];
...but I get 4 compilation errors from this code:

NSArray bundleArray = [NSArray arrayWithObject:[NSBundle mainBundle]];
error: invalid initializer
error: statically allocated instance of Objective-C class 'NSArray'
error: statically allocated instance of Objective-C class 'NSArray'

Well, this was written in Mail at 6:04am after about 4 hours of poor sleep...

NSArray *bundleArray = [NSArray arrayWithObject:[NSBundle mainBundle]];
        ^

managedObjectModel = [[NSManagedObjectModel mergedModelFromBundles: [NSArray arrayWithObject:[NSBundle mainBundle]]] retain];
I don't get compilation errors, but I get the same "The model configuration used to open the store is incompatible with the one that was used to create the store".


How did you create the original store?
If you created the store with another model (that included a model from perhaps another framework) then you won't be able to open it with a new model...


mmalc

_______________________________________________

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


References: 
 >10.5 + Core Data project error? (From: Alex Reynolds <email@hidden>)
 >Re: 10.5 + Core Data project error? (From: mmalc crawford <email@hidden>)
 >Re: 10.5 + Core Data project error? (From: Alex Reynolds <email@hidden>)

  • Prev by Date: Re: Concrete Protocols
  • Next by Date: Re: Concrete Protocols
  • Previous by thread: Re: 10.5 + Core Data project error?
  • Next by thread: Problem loading Nib
  • Index(es):
    • Date
    • Thread