• 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: Managed Object Model versions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Managed Object Model versions


  • Subject: Re: Managed Object Model versions
  • From: Luke Sneeringer <email@hidden>
  • Date: Fri, 30 Sep 2011 15:36:58 -0500

Nevermind, what you said sparked a light bulb. I'm looking at the code in my app delegate now. I think I'm on the right track.

Thanks for your help!

Regards,
Luke

On September 30, 2011, at 15:31 , Luke Sneeringer wrote:

> 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

References: 
 >Managed Object Model versions (From: Luke Sneeringer <email@hidden>)
 >Re: Managed Object Model versions (From: Heath Borders <email@hidden>)
 >Re: Managed Object Model versions (From: Luke Sneeringer <email@hidden>)

  • Prev by Date: Re: Managed Object Model versions
  • Next by Date: Re: Question about SMJobBless
  • Previous by thread: Re: Managed Object Model versions
  • Next by thread: Finder Integration
  • Index(es):
    • Date
    • Thread