[SQLObject] Re: Problems with transactions
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Cyril E. <cy...@de...> - 2004-08-31 16:25:35
|
Ian, the set() method doesn't take Transaction in account if an object has been retrieved outside a Transaction. ie: This works: BEGIN get_object modify set() COMMIT/ROLLBACK But this doesn't: get_object modify BEGIN set() COMMIT/ROLLBACK The reason is the _connection property is setted during object creation only. A simple solution is to add connection to the argument list of set (set(self, connection=None,**kw). For the moment when I use a transaction I explicitly do: obj._connection = trans_connection This way it works BTW I think that I have found where the problem with the validators lies, i'm testing. Regards Cyril Elkaim |