Re: Managed Object Model versions
Re: Managed Object Model versions
- Subject: Re: Managed Object Model versions
- From: Luke Sneeringer <email@hidden>
- Date: Fri, 30 Sep 2011 15:31:17 -0500
Hmm. I never did that...but perhaps that's my problem?
My code looks like...
MyAppDelegate* delegate = [[NSApplication sharedApplication] delegate];
NSManagedObjectContext* db = [delegate managedObjectContext];
NSEntityDescription* entity = [NSEntityDescription entityForName: @"MyObject" inManagedObjectContext: db];
MyObject* object = [[MyObject alloc] initWithEntity: entity insertIntoManagedObjectContext: db];
Am I missing something? I want to learn. :)
Regards,
Luke Sneeringer
On September 30, 2011, at 7:11 , Heath Borders wrote:
> You specify a URL for the persistent store when you create it. Just find the store at that URL.
>
> -Heath
>
> On Sep 30, 2011 12:33 AM, "Luke Sneeringer" <email@hidden> wrote:
> > Hey all,
> > I am working on writing my first Core Data application. I made an entity, did some work to test it, and then made another (linked) entity.
> > The problem is now I'm totally stuck, because when I try to do anything that affects Core Data, I get a completely unhelpful error message:
> >
> > "The managed object model version used to open the persistent store is incompatible with the one that was used to create the persistent store."
> >
> > Well, I Googled this, and there's some discussion about making migrations. I don't want to do that. I just want to blow away the old data store -- get it out of the filesystem and have the application make a new one.
> > However, I can't figure out how to do this. I found a blog entry suggesting that I look in ~/Library/Application Support/Application Name/, but my application doesn't seem to have made a folder in ~/Library/Application Support/ at all.
> >
> > So...how can I get rid of my old persistent store? It doesn't have to be programmatic -- in fact, I'd prefer it not be programmatic. I just want to wipe it off the disk.
> >
> > Help!
> >
> > Thanks,
> > Luke Sneeringer_______________________________________________
> >
> > 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