You've got it. The proper way to Begin, Commit, and Rollback Transactions is as follows:
$this->getAdapter()->getDriver()->getConnection()->beginTransaction();
$this->getAdapter()->getDriver()->getConnection()->commit();
$this->getAdapter()->getDriver()->getConnection()->rollback();
Just to put this out there too you can also get the Last ID created by:
$this->getAdapter()->getDriver()->getConnection()->getLastGeneratedValue()
If you are using pgSQL you will need to add the sequence to return the Last ID created:
$this->getAdapter()->getDriver()->getConnection()->getLastGeneratedValue('mail_mailid_seq')
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…