DDC-734 - REname query hint to fetchEager.
This commit is contained in:
parent
60eb755fe9
commit
fd502631c7
@ -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);
|
||||
|
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user