From: Rajeev J Sebastian <rajeev_jsv@di...> - 2005-05-09 12:34:27
How do I create a new object within a transaction ?
t = conn.transaction()
a = A(transaction=t)
a.a = 10
a.b = 5
How would I achieve something like the above ? It seems like transactions are
active only when one gets the object like A.get(1,t).
Rajeev J Sebastian
From: Brian Beck <exogen@gm...> - 2005-05-17 15:46:20
Rajeev J Sebastian wrote:
> How do I create a new object within a transaction ?
> class A(SQLObject)
> t = conn.transaction()
> a = A(transaction=t)
> a.a = 10
> a.b = 5
The same as what you have, except the keyword argument is called
a = A(connection=t)
Adventurer of the First Order