Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Jul 19, 2011
  1. @fabpot

    [DoctrineBundle] renamed RegistryInterface::getEntityManagerForObject…

    fabpot authored
    …() to getEntityManagerForClass()
Commits on Jul 6, 2011
  1. @fabpot

    added Registry::getEntityManagerForObject() to conveniently get the e…

    fabpot authored
    …ntity manager associated with a given Entity
Commits on Jun 8, 2011
  1. @fabpot

    refactored Doctrine Bridge

    fabpot authored
     * added a RegistryInterface
    
     * changed all classes to depend on the Registry instead of a specific EntityManager
    
    This is more consistent as the validator already took the registry and this allows
    to use any entity manager in Forms.
Commits on Jun 7, 2011
  1. @fabpot
  2. @fabpot
  3. @fabpot
Commits on Jun 6, 2011
  1. @fabpot

    [DoctrineBundle] fixed typo

    fabpot authored
Commits on May 26, 2011
  1. @fabpot
Commits on May 4, 2011
  1. @fabpot

    [DoctrineBundle] split Registry::getEntityManager() in two methods

    fabpot authored
    Resetting an entity manager has a lot of consequences and the developer should
    be aware of that. So, instead of implicitly reset an entity manager when it is
    closed, the developer should reset it by hand if he thinks that this is
    possible:
    
        $em = $this->get('registry')->getEntityManager();
        $em->getConnection()->beginTransaction(); // suspend auto-commit
        try {
            //... do some work
        } catch (Exception $e) {
            $em->getConnection()->rollback();
            $em->close();
    
            $this->get('registry')->resetEntityManager();
        }
    
        // you will get a new one
        $em = $this->get('registry')->getEntityManager();
Commits on May 3, 2011
  1. @fabpot

    [DoctrineBundle] changed the Registry to return a new instance if the…

    fabpot authored
    … 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();
        }
  2. @fabpot
Commits on May 2, 2011
  1. @fabpot

    [DoctrineBundle] introduced a Registry class

    fabpot authored
    The Registry knows all connections and entity managers declared into a service
    container. The Registry is available via the 'doctrine' service.
    
    If can be used to get connections and entity managers by name:
    
    Before:
    
    $em = $this->get('doctrine.orm.entity_manager');
    $em = $this->get('doctrine.orm.foobar_entity_manager');
    
    After:
    
    $em = $this->get('doctrine')->getEntityManager();
    $em = $this->get('doctrine')->getEntityManager('foobar');
    
    It is better for several reasons:
    
     * we rely less on naming conventions
     * IDEs will be able to auto-complete methods
Something went wrong with that request. Please try again.