FROM : Jerry Krinock
DATE : Fri Nov 23 18:24:49 2007
After I discovered and removed a bunch of stupid code, this problem
went away. It appears that I was either trying to insert or delete
objects twice, or trying to insert objects with relationships to
objects that had been deleted (inconsistent object graph).
Lesson: Do not assume that -[NSManagedObjectContext save:] will set
its argument to an NSError* whenever an error occurs. Always check
its return BOOL value, because more commonly when it fails it returns
NO but does ^not^ set the NSError*.
DATE : Fri Nov 23 18:24:49 2007
After I discovered and removed a bunch of stupid code, this problem
went away. It appears that I was either trying to insert or delete
objects twice, or trying to insert objects with relationships to
objects that had been deleted (inconsistent object graph).
Lesson: Do not assume that -[NSManagedObjectContext save:] will set
its argument to an NSError* whenever an error occurs. Always check
its return BOOL value, because more commonly when it fails it returns
NO but does ^not^ set the NSError*.
| Related mails | Author | Date |
|---|---|---|
| Jerry Krinock | Nov 22, 04:34 | |
| Jerry Krinock | Nov 23, 18:24 | |
| mmalc crawford | Nov 23, 23:46 | |
| Jerry Krinock | Nov 24, 06:47 | |
| Chris Hanson | Nov 24, 07:38 | |
| Jerry Krinock | Dec 5, 02:22 |






Cocoa mail archive

