Hi all,
I have a proposal to add "nested" transaction support to Zend_Db that is ready
to review: http://framework.zend.com/wiki/x/s1Y. This proposal has been sitting
out there for quite some time, but hasn't gotten a lot of attention.
Basically, it adds a feature to Zend_Db_Adapter_Abstract so that it will
automatically merge together any transactions that are started within some outer
transaction. The current behavior is to throw an exception when the first inner
transaction is started. This behavior is useful if you want to be able to easily
compose code that makes use of transactions: if you start a transaction in one
object, and that object uses another that starts it's own transaction, you don't
have to worry about an error being thrown. And since the transactions are
merged, when you issue a rollback anywhere, the entire thing is rolled back
properly. See the proposal for a better description, and a patch that implements
the feature. As always, comments and concerns are very welcome! :)
Regards,
Bryce Lohr