Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 10.5 + Core Data project error?




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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

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>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.