FROM : Jerry Krinock
DATE : Sat Nov 24 06:47:41 2007
On 2007 Nov, 23, at 14:46, mmalc crawford wrote:
> Under what circumstances is it not setting an error?
Unfortunately, I can't say for sure, because when it wouldn't tell me
what the error was, I took a broad look at what the hell I was doing
and realized that my code and data model were maintaining an
unnecessary entity. It looked like, prior to the -save:, I could have
been either (a) inserting or deleting the same objects twice, or (b)
inserting objects with relationships to objects that had been
deleted. (Multiple objects had relationships to the same other
objects, with Delete Rule = 'Cascade'. Oops.) But once I realized
that these other objects were not necessary, I got rid of their entity
and all that code, and things have been saving happily ever since.
What I am sure about is that, as per the code in my original post,
although I was giving -save: an NSError**, it was returning NO, my
store file on the disk was not touched, and the NSError* was nil.
If it ever happens again, I'll test more closely and let you know.
DATE : Sat Nov 24 06:47:41 2007
On 2007 Nov, 23, at 14:46, mmalc crawford wrote:
> Under what circumstances is it not setting an error?
Unfortunately, I can't say for sure, because when it wouldn't tell me
what the error was, I took a broad look at what the hell I was doing
and realized that my code and data model were maintaining an
unnecessary entity. It looked like, prior to the -save:, I could have
been either (a) inserting or deleting the same objects twice, or (b)
inserting objects with relationships to objects that had been
deleted. (Multiple objects had relationships to the same other
objects, with Delete Rule = 'Cascade'. Oops.) But once I realized
that these other objects were not necessary, I got rid of their entity
and all that code, and things have been saving happily ever since.
What I am sure about is that, as per the code in my original post,
although I was giving -save: an NSError**, it was returning NO, my
store file on the disk was not touched, and the NSError* was nil.
If it ever happens again, I'll test more closely and let you know.
| 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

