From 99e46a23c630a3081abbaa372de0712cfbb07ede Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Tue, 13 Dec 2011 21:24:02 +0100 Subject: [PATCH] Bugfix in UnitOfWorklib/Doctrine/ORM/UnitOfWork.phptriggerEagerLoads() --- lib/Doctrine/ORM/UnitOfWork.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/ORM/UnitOfWork.php b/lib/Doctrine/ORM/UnitOfWork.php index df33e9e5e..f02083d0d 100644 --- a/lib/Doctrine/ORM/UnitOfWork.php +++ b/lib/Doctrine/ORM/UnitOfWork.php @@ -2499,9 +2499,11 @@ class UnitOfWork implements PropertyChangedListener foreach ($eagerLoadingEntities as $entityName => $ids) { $class = $this->em->getClassMetadata($entityName); - $this->getEntityPersister($entityName)->loadAll( - array_combine($class->identifier, array(array_values($ids))) - ); + if ($ids) { + $this->getEntityPersister($entityName)->loadAll( + array_combine($class->identifier, array(array_values($ids))) + ); + } } }