DDC-1520: UnitOfWork->triggerEagerLoads raises SqlException #2152

doctrinebot opened this Issue Dec 6, 2011 · 2 comments

2 participants


Jira issue originally created by user h-andreas:

If all entities that are marked to be loaded eagerly are loaded through other references before UnitOfWork->triggerEagerLoads is executed an exception will be thrown as the value of the array is empty.

    public function triggerEagerLoads()
        if (!$this->eagerLoadingEntities) {

        // avoid infinite recursion
        $eagerLoadingEntities = $this->eagerLoadingEntities;
        $this->eagerLoadingEntities = array();

        foreach ($eagerLoadingEntities AS $entityName => $ids) {
            $class = $this->em->getClassMetadata($entityName);
            $this->getEntityPersister($entityName)->loadAll(array*combine($class->identifier, array(array*values($ids))));

Comment created by @beberlei:



Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.1.5 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment