014b19040c
$em = $this->get('doctrine')->getEntityManager(); $em->getConnection()->beginTransaction(); // suspend auto-commit try { //... do some work } catch (Exception $e) { $em->getConnection()->rollback(); $em->close(); // get a new EM $em = $this->get('doctrine')->getEntityManager(); } |
||
---|---|---|
.. | ||
Symfony |