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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to