How troubleshoot when Managed Object disappears from Store?
How troubleshoot when Managed Object disappears from Store?
- Subject: How troubleshoot when Managed Object disappears from Store?
- From: Jerry Krinock <email@hidden>
- Date: Sun, 1 Aug 2010 18:31:09 -0700
When initializing an NSPersistentDocument with sqlite store in a Mac app, I insert what I call a "singleton" managed object, like the "Department" in DepartmentAndEmployees. It's simply a container which has a to-many relationship to its containees (i.e., employees). Delete Rule is Nullify.
I've reproduced a bug whereupon, during some seemingly unrelated Core Data operations, this singleton object, which was in the store initially, is gone. I know this from saving the document, and then dumping the document file using sqlite3. The related CREATE TABLE and CREATE INDEX statements are still there, but the singular INSERT INTO statement is gone.
I tried to break in the debugger when the object disappears, by overriding -willTurnIntoFault, -didTurnIntoFault, and -validateForDelete:, but none of these messages are received.
Sometimes other objects disappear too, and it's possible that the store is being "hosed" more generally. But, oddly, I don't get even a peep from Core Data in console. It even loads OK if I close and reopen the document.
How can I debug this?
Thanks,
Jerry Krinock
_______________________________________________
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