Re: Editing Context Sporadically not Reverting?
Hi Andrew, Have you gotten anywhere on this? Chuck On 2011-07-31, at 12: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 = ; > 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 > To: webobjects-dev@lists.apple.com > > 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 > > -- > Andrew Lindesay > www.silvereye.co.nz > ___ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net > > This email sent to ch...@global-village.net -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Editing Context Sporadically not Reverting?
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 = ; 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 To: webobjects-dev@lists.apple.com 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 (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
RE: Editing Context Sporadically not Reverting?
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 = ; 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 To: webobjects-dev@lists.apple.com 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 -- Andrew Lindesay www.silvereye.co.nz ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Editing Context Sporadically not Reverting?
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 -- Andrew Lindesay www.silvereye.co.nz ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com