Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Commit

Permalink
apply the patch from 2.4 branch : http://www.doctrine-project.org/jir…
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume L committed Sep 9, 2014
1 parent c2135b3 commit bdb9bdf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lib/Doctrine/ORM/AbstractQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ public function execute($parameters = null, $hydrationMode = null)
return $stmt;
}

$data = $this->_em->getHydrator($this->_hydrationMode)->hydrateAll(
$data = $this->_em->newHydrator($this->_hydrationMode)->hydrateAll(
$stmt, $this->_resultSetMapping, $this->_hints
);

Expand Down
15 changes: 3 additions & 12 deletions lib/Doctrine/ORM/EntityManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,6 @@ class EntityManager implements ObjectManager
*/
private $eventManager;

/**
* The maintained (cached) hydrators. One instance per type.
*
* @var array
*/
private $hydrators = array();

/**
* The proxy factory used to create dynamic proxies.
*
Expand Down Expand Up @@ -764,16 +757,14 @@ public function getUnitOfWork()
* This method caches the hydrator instances which is used for all queries that don't
* selectively iterate over the result.
*
* @deprecated
*
* @param int $hydrationMode
* @return \Doctrine\ORM\Internal\Hydration\AbstractHydrator
*/
public function getHydrator($hydrationMode)
{
if ( ! isset($this->hydrators[$hydrationMode])) {
$this->hydrators[$hydrationMode] = $this->newHydrator($hydrationMode);
}

return $this->hydrators[$hydrationMode];
return $this->newHydrator($hydrationMode);
}

/**
Expand Down

0 comments on commit bdb9bdf

Please sign in to comment.