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