Skip to content

Commit

Permalink
Fixed typo in hints. Caused slow loading of eager entities.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Kleff committed Mar 12, 2013
1 parent 905c0b9 commit d937d1f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/Doctrine/ORM/Persisters/BasicEntityPersister.php
Expand Up @@ -851,7 +851,7 @@ public function loadCriteria(Criteria $criteria)
$stmt = $this->conn->executeQuery($query, $params, $types); $stmt = $this->conn->executeQuery($query, $params, $types);
$hydrator = $this->em->newHydrator(($this->selectJoinSql) ? Query::HYDRATE_OBJECT : Query::HYDRATE_SIMPLEOBJECT); $hydrator = $this->em->newHydrator(($this->selectJoinSql) ? Query::HYDRATE_OBJECT : Query::HYDRATE_SIMPLEOBJECT);


return $hydrator->hydrateAll($stmt, $this->rsm, array('deferEagerLoads' => true)); return $hydrator->hydrateAll($stmt, $this->rsm, array('deferEagerLoad' => true));
} }


/** /**
Expand Down Expand Up @@ -908,7 +908,7 @@ public function loadAll(array $criteria = array(), array $orderBy = null, $limit


$hydrator = $this->em->newHydrator(($this->selectJoinSql) ? Query::HYDRATE_OBJECT : Query::HYDRATE_SIMPLEOBJECT); $hydrator = $this->em->newHydrator(($this->selectJoinSql) ? Query::HYDRATE_OBJECT : Query::HYDRATE_SIMPLEOBJECT);


return $hydrator->hydrateAll($stmt, $this->rsm, array('deferEagerLoads' => true)); return $hydrator->hydrateAll($stmt, $this->rsm, array('deferEagerLoad' => true));
} }


/** /**
Expand Down Expand Up @@ -939,7 +939,7 @@ public function getManyToManyCollection(array $assoc, $sourceEntity, $offset = n
private function loadArrayFromStatement($assoc, $stmt) private function loadArrayFromStatement($assoc, $stmt)
{ {
$rsm = $this->rsm; $rsm = $this->rsm;
$hints = array('deferEagerLoads' => true); $hints = array('deferEagerLoad' => true);


if (isset($assoc['indexBy'])) { if (isset($assoc['indexBy'])) {
$rsm = clone ($this->rsm); // this is necessary because the "default rsm" should be changed. $rsm = clone ($this->rsm); // this is necessary because the "default rsm" should be changed.
Expand All @@ -962,8 +962,8 @@ private function loadCollectionFromStatement($assoc, $stmt, $coll)
{ {
$rsm = $this->rsm; $rsm = $this->rsm;
$hints = array( $hints = array(
'deferEagerLoads' => true, 'deferEagerLoad' => true,
'collection' => $coll 'collection' => $coll
); );


if (isset($assoc['indexBy'])) { if (isset($assoc['indexBy'])) {
Expand Down

0 comments on commit d937d1f

Please sign in to comment.