Re: Core Data completely unable to find the source object model for migration
Re: Core Data completely unable to find the source object model for migration
- Subject: Re: Core Data completely unable to find the source object model for migration
- From: Daniel DeCovnick <email@hidden>
- Date: Wed, 05 Aug 2009 23:41:50 -0700
I had this exact problem. I did exactly what he did, and to continue
this, yes, I did create a mapping model. Never got it to work, but I
had a user base of 1 and a database of about 10 objects at the time,
so I just abandoned attempting migration entirely and recreated the DB
with the new model by hand. If there's a solution, I'd love to hear
about it.
That said, I did learn a couple of things in the attempts. First, as
long as there was a second data model and mapping model in the
project, that error would occur, regardless of which model was set as
the current version. Also, attempting to set the the current model
would occasionally cause Xcode to report an internal error, and
afterwards (even through relaunching Xcode), setting the current model
version would do nothing (the check mark wouldn't move) unless I
deleted both references and re-added them to the project. This leads
me to believe that it's an Xcode bug, but I don't see how it can be if
almost no one is running into this. Are there only two people in the
world migrating data?
-Daniel
On Aug 5, 2009, at 9:06 AM, mmalc Crawford wrote:
On Aug 4, 2009, at 11:20 PM, Matteo Manferdini wrote:
I created a mapping model and
called addPersistentStoreWithType:configuration:URL:options:error:
with the NSMigratePersistentStoresAutomaticallyOption option.
Did you create a mapping model?
If not, did you specify the NSInferMappingModelAutomaticallyOption
option?
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:YES],
NSMigratePersistentStoresAutomaticallyOption,
[NSNumber numberWithBool:YES],
NSInferMappingModelAutomaticallyOption, nil];
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