Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Dec 15, 2011
  1. @beberlei
Commits on Dec 5, 2011
  1. @pulse00
Commits on Nov 17, 2011
  1. @beberlei

    Fix LICENSE

    beberlei authored
  2. @beberlei
Commits on Oct 16, 2011
  1. @lsmith77
Commits on Sep 25, 2011
  1. @lsmith77
  2. @lsmith77
Commits on Sep 23, 2011
  1. @lsmith77

    added a default implementation of the ManagerRegistry integrating the…

    lsmith77 authored
    … container
    
    attempted to maintain BC as good as possible, but RegistryInterface::getRepository() had to be dropped from RegistryInterface. Its still part of the ManagerRegistry, so its only a BC break for people using RegistryInterface to create their own implementation
Commits on Jul 19, 2011
  1. @fabpot

    [DoctrineBundle] renamed RegistryInterface::getEntityManagerForObject…

    fabpot authored
    …() to getEntityManagerForClass()
Commits on Jul 9, 2011
  1. @stof
  2. @stof
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 Jun 2, 2011
  1. @weaverryan
  2. @weaverryan

    [FrameworkBundle][DoctrineBundle] Adding a few shortcut methods

    weaverryan authored
    This adds to convience methods, for two separate reasons:
    
    * Controller::getDoctrine() - this will allow method completion on the Registry class to work in IDEs, is slightly shorter, and should feel very "concrete" to beginners
    
    * Registry::getRepository() - the repository is a very convenient thing to need - this allows it to be fetched much more succintly
    
    Overall Before:
    
        $product = $this->get('doctrine')
            ->getEntityManager()
            ->getRepository('AcmeDemoBundle:Product')
            ->find($id);
    
    Overall After (with IDE method auto-completion for `getRepository`):
    
        $product = $this->getDoctrine()
            ->getRepository('AcmeDemoBundle:Product')
            ->find($id);
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.