[Zope-DB] ZSQLMethod commits inside a DTML method
Dieter Maurer
dieter@handshake.de
Thu, 29 May 2003 20:56:20 +0200
"\"David A. Riggs\"" wrote at 2003-5-28 18:36 -0400:
> I'm trying to execute multiple ZSQLMethods in series inside
> a DTML method...
>
> <!-- Start DTML method -->
>
> <dtml-call sqlMethod1> <!-- insert row in table 1 -->
> <dtml-call sqlMethod2> <!-- insert row in table 2 -->
> <dtml-call sqlMethod3> <!-- insert row with foreign keys -->
>
> <!-- End DTML method -->
>
>
> The first two ZSQLMethods insert rows into two tables, the
> third inserts a row which references these other two tables
> with a foreign key.
>
> If I call them individually, in other words ensure that the
> rows from the first two calls have been inserted, then the
> third ZSQLMethod works as expected. However when calling the
> three of them as above in a DTML method, the third fails
> citing referential integrity violation for not seeing the
> key from the other tables.
All these ZSQL methods use the same DA?
Then, your database system seems to be broken.
Of course, a transaction should see the effects it itself has
produced.
Dieter