1
0
mirror of synced 2025-01-30 20:11:49 +03:00

DDC-734 - REname query hint to fetchEager.

This commit is contained in:
Benjamin Eberlei 2011-03-08 22:28:55 +01:00
parent 60eb755fe9
commit fd502631c7
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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));