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 protected]>
To: [email protected]

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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to