Skip to content
This repository

Jun 30, 2012

  1. Alexander Miehe

    added PHPDocs

    authored June 30, 2012

May 11, 2012

  1. patrick-mcdougle

    Removed full namespaces from documentation that were not needed becau…

    …se the namespace was "use"d.

Jan 28, 2012

  1. Benjamin Eberlei

    Fixes GH-10 - Add FQN to returns of Registry.

    authored January 28, 2012

Dec 15, 2011

  1. Benjamin Eberlei

    Merge branch 'MergeSymfonyUpstream'

    authored December 15, 2011

Dec 05, 2011

  1. Robert Gründler

    [DoctrineBundle] added EntityManager to use statements in registry (I…

    …DE support)
    authored December 05, 2011

Nov 17, 2011

  1. Benjamin Eberlei

    Fix LICENSE

    authored November 17, 2011
  2. Benjamin Eberlei

    Adjust namespace from Symfony\Bundle to Doctrine\Bundle

    authored November 17, 2011

Oct 16, 2011

  1. Lukas Kahwe Smith

    cleaned up the use statements in the Registry class and RegistryInter…

    …face
    authored October 16, 2011

Sep 25, 2011

  1. Lukas Kahwe Smith

    fixed getting the alias for a namespace

    authored September 25, 2011
  2. Lukas Kahwe Smith

    use getObjectNamespace() in getEntityNamespace()

    authored September 25, 2011

Sep 23, 2011

  1. Lukas Kahwe Smith

    added a default implementation of the ManagerRegistry integrating the…

    … 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
    authored September 23, 2011

Jul 19, 2011

  1. Fabien Potencier

    [DoctrineBundle] renamed RegistryInterface::getEntityManagerForObject…

    …() to getEntityManagerForClass()
    authored July 19, 2011

Jul 09, 2011

  1. Christophe Coevoet

    [DoctrineBundle] Fixed the transient test

    authored July 09, 2011
  2. Christophe Coevoet

    [DoctrineBundle] Fixed the Registry::getEntityManagerForObject method

    authored July 09, 2011

Jul 06, 2011

  1. Fabien Potencier

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

    …ntity manager associated with a given Entity
    authored July 06, 2011

Jun 08, 2011

  1. Fabien Potencier

    refactored Doctrine Bridge

     * 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.
    authored June 08, 2011

Jun 07, 2011

  1. Fabien Potencier

    [DoctrineBundle] added Registry::getEntityManagers()

    authored June 07, 2011
  2. Fabien Potencier

    [DoctrineBundle] added Registry::getConnections()

    authored June 07, 2011
  3. Fabien Potencier

    [DoctrineBundle] tweaked phpdoc

    authored June 07, 2011

Jun 06, 2011

  1. Fabien Potencier

    [DoctrineBundle] fixed typo

    authored June 06, 2011

Jun 02, 2011

  1. Ryan Weaver

    [DoctrineBundle] Fixing error per @stloyd

    authored June 02, 2011
  2. Ryan Weaver

    [FrameworkBundle][DoctrineBundle] Adding a few shortcut methods

    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);
    authored June 02, 2011

May 26, 2011

  1. Fabien Potencier

    [DoctrineBundle] extracted code from Doctrine commands

    authored May 26, 2011

May 04, 2011

  1. Fabien Potencier

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

    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();
    authored May 04, 2011

May 03, 2011

  1. Fabien Potencier

    [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();
        }
    authored May 03, 2011
  2. Fabien Potencier

    [DoctrineBundle] removed redundant check

    authored May 03, 2011

May 02, 2011

  1. Fabien Potencier

    [DoctrineBundle] introduced a Registry class

    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
    authored May 02, 2011
Something went wrong with that request. Please try again.