From fd502631c7c119ad752d0fd43c4d2535717b6052 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Tue, 8 Mar 2011 22:28:55 +0100 Subject: [PATCH] DDC-734 - REname query hint to fetchEager. --- lib/Doctrine/ORM/UnitOfWork.php | 2 +- tests/Doctrine/Tests/ORM/Functional/QueryTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/UnitOfWork.php b/lib/Doctrine/ORM/UnitOfWork.php index 45b2c612b..8ed9dbb54 100644 --- a/lib/Doctrine/ORM/UnitOfWork.php +++ b/lib/Doctrine/ORM/UnitOfWork.php @@ -1955,7 +1955,7 @@ class UnitOfWork implements PropertyChangedListener ->loadOneToOneEntity($assoc, $entity, null, $associatedId); } else { // Deferred eager load only works for single identifier classes - if ($assoc['fetch'] == ClassMetadata::FETCH_EAGER || isset($hints['eagerFetch'][$class->name][$field])) { + if ($assoc['fetch'] == ClassMetadata::FETCH_EAGER || isset($hints['fetchEager'][$class->name][$field])) { if (isset($hints['deferEagerLoad']) && !$targetClass->isIdentifierComposite) { // TODO: Is there a faster approach? $this->eagerLoadingEntities[$assoc['targetEntity']][] = current($id); diff --git a/tests/Doctrine/Tests/ORM/Functional/QueryTest.php b/tests/Doctrine/Tests/ORM/Functional/QueryTest.php index 1519e1941..4f0dc6879 100644 --- a/tests/Doctrine/Tests/ORM/Functional/QueryTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/QueryTest.php @@ -335,7 +335,7 @@ class QueryTest extends \Doctrine\Tests\OrmFunctionalTestCase $this->_em->clear(); $articles = $this->_em->createQuery('select a from Doctrine\Tests\Models\CMS\CmsArticle a') - ->setHint('eagerFetch', array('Doctrine\Tests\Models\CMS\CmsArticle' => array('user' => true))) + ->setHint('fetchEager', array('Doctrine\Tests\Models\CMS\CmsArticle' => array('user' => true))) ->getResult(); $this->assertEquals(10, count($articles));