title: Cannot rollback transaction in Zend Framework
body: <p>I use the following code for transaction in Zend Framework but the rollback function doesn't work (Data is inserted into the database by insertSome($data)).
  What's wrong?</p>
  
  <pre><code>            $db-&gt;beginTransaction();
              try{
                 $model-&gt;insertSome($data);
                 $model-&gt;insertAll($data2); //this line cannot be run and the whole transaction should be rolled back.
                 $db-&gt;commit();
              } catch (Exception $e) {
                  $db-&gt;rollBack();
                  echo $e-&gt;getMessage();
              }
  </code></pre>