Re: Editing Context Sporadically not Reverting?
Re: Editing Context Sporadically not Reverting?
- Subject: Re: Editing Context Sporadically not Reverting?
- From: Jon Nolan <email@hidden>
- Date: Sun, 31 Jul 2011 14:31:30 -0600
- Organization: Loch Garman
I've never been able to depend on ec.updatedObjects() although eo.isUpdatedObject() seems bulletproof. I don't have an answer for you but it might be worth checking the latter when the exception is thrown. Perhaps it'll give you another clue.
On 7/31/11 1:36 PM, Andrew Lindesay wrote:
Hi there;
I'm still trying to track this one down; getting closer to the source of the issue, sporadically the exception below (illogically) fires;
- - - - -
EOEditingContext ec = myEo.editingContext(); // actually default ec
String newValue = <GEN RANDOM STRING>;
myEo.setFoo(newValue);
if(ec.updatedObjects().isEmpty())
throw new IllegalStateException("...");
- - - - -
Has anybody got any ideas about what broadly happens between a value being set on an EO and the editing context's "updated objects" being populated? -- this may give me some leads.
cheers.
-------- Original Message --------
Subject: Editing Context Sporadically not Reverting?
Date: Fri, 29 Jul 2011 11:20:34 +1200
From: Andrew Lindesay <email@hidden>
To: email@hidden
Hi;
We're seeing a wierd one which I have not previously had come up.
I have an object X living in the default EC which is modified by
"takeValuesFromRequest(..)". In the "invokeAction(..)" the method
"revert()" is invoked on the default EC. However the modifications on X
survive the revert. This happens sporadically. If I look at
"updatedObjects()" on the ec just prior to the revert, when this problem
arises it seems to think it has no modified objects.
I'm fairly sure that I am sticking to the "editing context golden rules"
and are not doing anything terribly wierd.
Has anybody else seen this one?
cheers
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden