Re: [Zope-dev] what transaction does get_transaction().commit() really commit?
Jephte Clain wrote: the question is: what transaction is commited with get_transaction().commit() ? It is only the one associated with the connection, or also the transaction in which is the caller? I mean, if my method is called from within Zope, is the transaction of the caller commited? In the default implementation, there is one transaction per thread. When you commit(), you commit everything your caller changed as well. Connections are somewhat independent of transactions, if that helps. Shane ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] what transaction does get_transaction().commit() really commit?
hello, I have a method that reads: 8 def do_something(self): from Zope import DB conn = db.open() conn.root()['name'] = 'value' get_transaction().commit() conn.close() 8 the method can be called from everywhere, and that's the reason why I have to open a connection, in case one is not available. the question is: what transaction is commited with get_transaction().commit() ? It is only the one associated with the connection, or also the transaction in which is the caller? I mean, if my method is called from within Zope, is the transaction of the caller commited? thanks for any response regards, [EMAIL PROTECTED] __ BoƮte aux lettres - Caramail - http://www.caramail.com