My database tables for person records are organized as follows:
jnp (1:1) per (1:n) adr (1:n) tel

As i use foreign key constraints, i have to handle deletions of jnp
records with the following method:

class JnpBizobj(dabo.biz.dBizobj):
...
    def deleteCurrentRecord(self):
        crs = self._CurrentCursor
        crs.beginTransaction()
        all_ok = 0
        try:
            self.deleteAllChildren()
            self.delete()
            all_ok = 1
        finally:
            if all_ok:
                crs.commitTransaction()
            else:
                crs.rollbackTransaction()
        return all_ok

This is what i get in my db activity log:
Database Activity Log: Thu Nov 15 15:48:45 2007: SQL: select count(*) as
cnt from PER where PER."IID"=1000028
Database Activity Log: Thu Nov 15 15:48:45 2007: SQL: delete from PER
where PER."IID"=1000028
Database Activity Log: Thu Nov 15 15:48:45 2007: SQL: commit
Database Activity Log: Thu Nov 15 15:48:45 2007: SQL: begin
Database Activity Log: Thu Nov 15 15:48:45 2007: SQL: select count(*) as
cnt from JNP where JNP."IID"=1000048
Database Activity Log: Thu Nov 15 15:48:45 2007: SQL: delete from JNP
where JNP."IID"=1000048
Database Activity Log: Thu Nov 15 15:48:45 2007: SQL: commit

The reason why it doesn't work as it did in the past is that the app
stores a bizobj as the transaction token instead of the connection.

Please tell me how i should start and end explicit transaction handling
after the big changes in transaction handling.

Sorry to come up with this again!!

Uwe


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]

Reply via email to