• 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: Johann Werner <email@hidden>
  • Date: Sat, 5 Sep 2009 12:47:47 +0200

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: "Chan Yeow Heong, Jerome" <email@hidden>
References: 
 >Nested EOEditingContext Question (From: "Chan Yeow Heong, Jerome" <email@hidden>)

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