title: Can I use Doctrine transaction together with mysql PDO statements?
body: <p>From below code I expect that $query1 will be undone after Exception is 
  thrown. But it's not.</p>
  
  <pre><code>try {
      $this-&gt;em-&gt;getConnection()-&gt;beginTransaction();
      PDO::exec($query1 = 'INSERT INTO foo...')
      throw new Exception();
      PDO::exec($query2 = 'INSERT INTO bar...')
      $this-&gt;em-&gt;flush();
      $this-&gt;em-&gt;getConnection()-&gt;commit();
  } catch (\Exception $e) {
      $this-&gt;em-&gt;getConnection()-&gt;rollBack();
      throw $e;
  }
  </code></pre>