Re: [SQLObject] Re: Problems with transactions
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Ian B. <ia...@co...> - 2004-08-31 03:46:44
|
Cyril Elkaim wrote: > I answer my own message, > > I didn't understand that I must pass a transction object in lieu of the > connection object. That works this way. But I think there is a problem > yet with the pool of sql connections when doing multithreading. Not sure > that the same SQL connection is used twice by _runWithConnection during > a transaction implying multiple SQL statements. Any ideas? It should be. If you turn on debugging, you should see connection IDs, which should help you see what queries belong to the same transaction. I'm not entirely comfortable with how that all works, so there certainly may be bugs, but I've tried to make it work. The Transaction object fiddles with the underlying connection, calling the connection's methods with the transaction object as "self". This way it overrides some specific methods (those that get connections) even if they are called indirectly. -- Ian Bicking / ia...@co... / http://blog.ianbicking.org |