Re: Strange Core Data save behaviour (required relationship nil... when it is set the line before saving)

2009-10-16 Thread Luke Evans
Darn, I thought his problem had gone away, but I still get the failure to save from time to time (the probability of occurrence is pretty low though). I'm even setting the problematic relationship to nil before deleting the object, then calling -processPendingChanges, then saving the

Re: Strange Core Data save behaviour (required relationship nil... when it is set the line before saving)

2009-09-30 Thread Ben Trumbull
On Sep 30, 2009, at 12:56 AM, Luke Evans wrote: Well, I'm more than happy to file a bug, as it has been tricky to figure out (and I would probably still be at it without your interjection). There are several ways to frame the problem of course: it could be a documentation bug... things

Re: Strange Core Data save behaviour (required relationship nil... when it is set the line before saving)

2009-09-30 Thread Ben Trumbull
I don't think anyone has cared enough to file a bug on this. I don't get it. There's an open manhole in the street with the manhole cover lying right next to it, and the problem is that no one cared enough to call the Department of Works to complain? This has come up 3 or 4 times in about

re: Strange Core Data save behaviour (required relationship nil... when it is set the line before saving)

2009-09-29 Thread Ben Trumbull
Now, I have some code that changes the value of the 'B enumeration value' that A is using. This does the following: 1. Create a new instance of the B subentity that represents the value we want (in the same MOC as A) 2. Delete the old B object that A was pointing to, i.e. [moc deleteObject:B];

Re: Strange Core Data save behaviour (required relationship nil... when it is set the line before saving)

2009-09-29 Thread Luke Evans
Hello Ben. What happens if you add a call to -processPendingChanges in between #2 and #3 ? ... well then everything works wonderfully (oh joy!!) :-) OK. I need to get a proper mental picture of why this is needed in this case. I guess I was vaguely aware of this method from previous

Re: Strange Core Data save behaviour (required relationship nil... when it is set the line before saving)

2009-09-29 Thread Ben Trumbull
On Sep 29, 2009, at 8:22 PM, Luke Evans wrote: Hello Ben. What happens if you add a call to -processPendingChanges in between #2 and #3 ? ... well then everything works wonderfully (oh joy!!) :-) OK. I need to get a proper mental picture of why this is needed in this case. I guess I

Re: Strange Core Data save behaviour (required relationship nil... when it is set the line before saving)

2009-09-29 Thread Luke Evans
Well, I'm more than happy to file a bug, as it has been tricky to figure out (and I would probably still be at it without your interjection). There are several ways to frame the problem of course: it could be a documentation bug... things aren't as simple as might first appear in the

Re: Strange Core Data save behaviour (required relationship nil... when it is set the line before saving)

2009-09-29 Thread Quincey Morris
On Sep 29, 2009, at 21:56, Luke Evans wrote: Well, I'm more than happy to file a bug, as it has been tricky to figure out (and I would probably still be at it without your interjection). ... On 2009-09-29, at 8:16 PM, Ben Trumbull wrote: ... I don't think anyone has cared enough to

Strange Core Data save behaviour (required relationship nil... when it is set the line before saving)

2009-09-28 Thread Luke Evans
I'm having some odd behaviour when saving a particular kind of change and am having trouble groking was is going on. I have an entity (A) that has a to-one relationship with another very simple abstract entity (B), a kind of an enumeration, whose mere type represents the value. As a kind

Re: Strange Core Data save behaviour (required relationship nil... when it is set the line before saving)

2009-09-28 Thread Quincey Morris
On Sep 28, 2009, at 17:20, Luke Evans wrote: I have an entity (A) that has a to-one relationship with another very simple abstract entity (B), a kind of an enumeration, whose mere type represents the value. As a kind of enumeration value, the B entity has a fixed number of concrete