Re: What does core data do during a Save As?
Re: What does core data do during a Save As?
- Subject: Re: What does core data do during a Save As?
- From: Jerry Krinock <email@hidden>
- Date: Fri, 1 Oct 2010 22:02:24 -0700
On 2010 Oct 01, at 10:44, Quincey Morris wrote:
> Core Data implements Save As as a migration process using a mapping model that it constructs on the fly
Eeek. I never knew that.
> and that this fails for models that have parent entities -- specifically when the parent entities contain relationships.
This sounds like the same bug that you pointed me to a few weeks ago, and which I pointed Gideon to a couple days ago. If so, it is definitely fixed in 10.6.
On 2010 Oct 01, at 11:28, Gideon King wrote:
> I'm not sure that this is my problem though. I do have a parent/child relationship, and I am seeing the problem on a number of relationships on the parent entity and one relationship on the child entity, but also on one relationship that involves two entities that do not have any parents/children.
I'll presume you're seeing this in 10.6.
A few months ago, I had a couple documents which would crash 80% of the time upon Save As, in 10.6. Never found the cause, but after doing some serious rework on my document class for another reason, fixing memory leaks in the process, after that the problem went away. You might want to check if your document deallocs during a normal close.
> Removing Save As really isn't an option.
What I did for a few beta versions, before my document class rework, was to re-implement Save As to shuffle the files around and then re-open the document. The code was ugly, and it was a head-scratcher for the user to see the window close and then reopen, but it worked.
I really hope you don't need to go there. I'm kind of sorry I typed the previous paragraph.
> The next thing I'm dreading with Core Data is trying to get autosave to work. I got some tips from Ben Trumbull, but it looks like a scary amount of work that I don't fully understand...but that's for another day...
Maybe you've not yet read in the Core Data Programming Guide the hoops that you need to jump through in order to make "Revert to Saved" work? I'm still using a close-and-reopen since I couldn't get that to work either. Maybe my document class rework has fixed it; I should retry Apple's hoops one of these days, but it's not a priority.
_______________________________________________
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