Hi Birthe,

Here are a couple of ideas for you to look at.

Entities can be backed by a stored procedure, see the Procedures tab on an 
Entity in the Entity Modeler.  If you can model this as a changed EO, that will 
be the simplest.

There is also the EOAdaptorContext.Delegate which has a methods 
adaptorContextShouldCommit and adaptorContextDidBegin that could probably be 
used to get the stored procedure changes in the transaction.

Finally, if all of that fails or you want a different, more flexible solution, 
then you could look at adding some generic "datastore operation" class to EOF.  
Instances of this would get added to the editing context and pushed down into 
the lower levels of EOF during saveChanges() and executed on the database 
(database usually) during the transaction.  This is going to require some 
wiring into EOF and may not be possible without having access to the source.

Chuck

From: 
<webobjects-dev-bounces+chill=gevityinc....@lists.apple.com<mailto:webobjects-dev-bounces+chill=gevityinc....@lists.apple.com>>
 on behalf of Birthe Berland <b...@complimenta.com<mailto:b...@complimenta.com>>
Date: Wednesday, October 28, 2015 at 6:12 AM
To: "webobjects-dev@lists.apple.com<mailto:webobjects-dev@lists.apple.com>" 
<webobjects-dev@lists.apple.com<mailto:webobjects-dev@lists.apple.com>>
Subject: Transactions

I need to be able to do several things in the same transaction.

Specifically I have inserted some new objects in the editing context and I need 
to save them and make at number og stored procedure calls in the same 
transaction. I have tried to insert  beginTransaction and commitTransaction 
around it all, but Webobjects sends a commit between each.

Is there any way I can do this?

ed venlig hilsen

Birthe Berland
Complimenta
Tel.: 8830 7600


[cid:C74DDE03-FC9C-483F-AE7B-65E54B085670@SSG5-Serial]

 _______________________________________________
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to