1
0
mirror of synced 2025-03-22 16:03:49 +03:00

[DDC-952] Fix merge/rebase mistake.

This commit is contained in:
Benjamin Eberlei 2011-03-06 15:28:26 +01:00
parent 03630df20d
commit d9c8a9eecb

@ -804,18 +804,21 @@ class BasicEntityPersister
* @param PersistentCollection $coll
*/
private function loadCollectionFromStatement($assoc, $stmt, $coll)
{
{
$hints = array('deferEagerLoads' => true);
if (isset($assoc['indexBy'])) {
while ($result = $stmt->fetch(PDO::FETCH_ASSOC)) {
$entity = $this->_createEntity($result);
$entity = $this->_createEntity($result, null, $hints);
$coll->hydrateSet($this->_class->reflFields[$assoc['indexBy']]->getValue($entity), $entity);
}
} else {
while ($result = $stmt->fetch(PDO::FETCH_ASSOC)) {
$coll->hydrateAdd($this->_createEntity($result));
$coll->hydrateAdd($this->_createEntity($result, null, $hints));
}
}
$stmt->closeCursor();
$this->_em->getUnitOfWork()->triggerEagerLoads();
}
/**
@ -880,14 +883,7 @@ class BasicEntityPersister
$sql = $this->_getSelectEntitiesSQL($criteria, $assoc, 0, $limit, $offset);
list($params, $types) = $this->expandParameters($criteria);
$stmt = $this->_conn->executeQuery($sql, $params, $types);
$hints = array('deferEagerLoads' => true);
while ($result = $stmt->fetch(PDO::FETCH_ASSOC)) {
$coll->hydrateAdd($this->_createEntity($result, null, $hints));
}
$stmt->closeCursor();
$this->_em->getUnitOfWork()->triggerEagerLoads();
return $this->_conn->executeQuery($sql, $params, $types);
}
/**
@ -1348,15 +1344,7 @@ class BasicEntityPersister
$sql = $this->_getSelectEntitiesSQL($criteria, $assoc, 0, $limit, $offset);
list($params, $types) = $this->expandParameters($criteria);
$stmt = $this->_conn->executeQuery($sql, $params, $types);
$hints = array('deferEagerLoads' => true);
while ($result = $stmt->fetch(PDO::FETCH_ASSOC)) {
$coll->hydrateAdd($this->_createEntity($result, null, $hints));
}
$stmt->closeCursor();
$this->_em->getUnitOfWork()->triggerEagerLoads();
return $stmt;
return $this->_conn->executeQuery($sql, $params, $types);
}
/**