Am 30.05.2007 um 13:20 schrieb Frederic JECKER:

Hi,

In my case, I can't insert objects in the editing context at their creation but only at the end of the transaction because the user
can cancel his action at any time.

That is why we use EditingContexts....

create EdCon
new & insert
new & insert
....
user cancels -> just throw EdCon away
user commits -> EdCon.saveChanges()


Doing as decribed works (I do it myself) but if I do so, I will need to call at editingContext.revert()

No. Just use a new EdCon.

to prevent unwanted changes to be saved in the database by another part of my app using the same context.

Don't use the same.

To sum up, I'm just looking for a method like EOEditingContext.awakeFromInsert except that it would be called before inserting objects instead of after. This way I could insert relationship members in the editingContext for each EOCustomObject in their own classes and avoid huge code blocks of insert
in my main controller

You are using EOF the wrong way if you try that. Just don’t.

And yes, multiple EdCons are the normal way to work with this. Thats why every WOSession has one for itself. So that you don't have to think about the other Sessions' EDCons.

        atze


_______________________________________________
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