[Zope] [SQL] Retrieving info from the previous SQL insert

Dieter Maurer dieter@handshake.de
Tue, 11 Dec 2001 22:30:05 +0100


Stephane Bortzmeyer writes:
 > I have a SQL method which performs an INSERT in one table, followed by
 > an INSERT into another table. The two INSERTs have to be in the same
 > method because they need to be atomic.
It is not necessary for both inserts to be in the same method!
In Zope, all operations for one request are executed in a single
transaction (if your DA does not set "auto-commit" mode).
Thus, they form an atomic sequence even if executed in different methods.


Dieter