This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src
Fabien Potencier 014b19040c [DoctrineBundle] changed the Registry to return a new instance if the current em is closed
$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();
    }
2011-05-03 07:39:12 +02:00
..
Symfony [DoctrineBundle] changed the Registry to return a new instance if the current em is closed 2011-05-03 07:39:12 +02:00