• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Nested EOEditingContext Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nested EOEditingContext Question


  • Subject: Re: Nested EOEditingContext Question
  • From: "Chan Yeow Heong, Jerome" <email@hidden>
  • Date: Sun, 06 Sep 2009 16:29:54 +0800

So what happens after I do

nested.save();
original.save();

Does nested go away? Does it get garbage collected?
What is the editing context of the objects manipulated after both saves are done? Is it original?



On 05-Sep-2009, at 6:47 PM, Johann Werner wrote:

Hi Jerome,

Am 05.09.2009 um 11:50 schrieb Chan Yeow Heong, Jerome:

When I'm using nested editing contexts, do I need to call revert on a original editing context when I call revert on the nested context?


EOEditingContext original = ERXEC.newEditingContext(true); EOEditingContext nested = ERXEC.newEditingContext(original,true);

... do some work ...


... something went wrong and we have to cancel all changes ...

nested.revert();
original.revert(); // <-- Is this second call needed?

No, this call is not needed. A nested editing context behaves as any other 'normal' editing context with the only difference that saving the context doesn't push your changes to the db but into the parent context. So either call revert on your nested context or just discard the context and replace it by a new one.


jw

_______________________________________________ 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
  • Follow-Ups:
    • Re: Nested EOEditingContext Question
      • From: Johann Werner <email@hidden>
References: 
 >Nested EOEditingContext Question (From: "Chan Yeow Heong, Jerome" <email@hidden>)
 >Re: Nested EOEditingContext Question (From: Johann Werner <email@hidden>)

  • Prev by Date: GUI DB editor for mysql
  • Next by Date: Re: Nested EOEditingContext Question
  • Previous by thread: Re: Nested EOEditingContext Question
  • Next by thread: Re: Nested EOEditingContext Question
  • Index(es):
    • Date
    • Thread