[Zope] database transaction problem

martin f krafft madduck at madduck.net
Sun Mar 14 01:32:40 EST 2004


I am experiencing a problem with my Zope application, interfacing
with PostgreSQL through PsycopDA. The problem is basically that
a python script creates a new record in a database table, which is
used by exUserFolder as a backend for authentication (thus
containing the list of all users). When this completes, the script
calls another script which tries to change ownership of a ZoDB
object to the newly created user, which fails because

  "Only users in this site can be made owners."

I think the problem is rooted in the fact that python scripts work
on databases in transaction batches, and as the script has not
finished, the transaction adding the user has not been committed.

Other than issuing a manual COMMIT, how can I make sure that
exUserFolder sees the changes made to a database while the script is
still executing?

Thanks,

-- 
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net at madduck
 
invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver!
 
"frank harris has been received
 in all the great houses -- once!"
                                                        -- oscar wilde
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope/attachments/20040314/00782689/attachment.bin


More information about the Zope mailing list