This commit is contained in:
parent
f26217c87a
commit
330bf1d408
@ -398,8 +398,12 @@ class Doctrine_Hydrate
|
||||
reset($this->_aliasMap);
|
||||
$rootMap = current($this->_aliasMap);
|
||||
$rootAlias = key($this->_aliasMap);
|
||||
$coll = new Doctrine_Collection2($rootMap['table']);
|
||||
$coll = new Doctrine_Collection($rootMap['table']);
|
||||
$prev[$rootAlias] = $coll;
|
||||
|
||||
// we keep track of all the collections
|
||||
$colls = array();
|
||||
$colls[] = $coll;
|
||||
|
||||
$prevRow = array();
|
||||
/**
|
||||
@ -471,6 +475,9 @@ class Doctrine_Hydrate
|
||||
// previous entry found from memory
|
||||
$prev[$alias] = $prev[$parentAlias]->getLast()->get($relation->getAlias());
|
||||
}
|
||||
|
||||
$colls[] = $prev[$alias];
|
||||
|
||||
// add record to the current collection
|
||||
if ($identifiable) {
|
||||
$prev[$alias]->add($record);
|
||||
@ -491,6 +498,11 @@ class Doctrine_Hydrate
|
||||
$prevRow[$tableAlias] = $row;
|
||||
}
|
||||
}
|
||||
// take snapshots from all initialized collections
|
||||
foreach(array_unique($colls) as $coll) {
|
||||
$coll->takeSnapshot();
|
||||
}
|
||||
|
||||
return $coll;
|
||||
}
|
||||
/**
|
||||
|
@ -30,7 +30,7 @@ Doctrine::autoload('Doctrine_Hydrate');
|
||||
* @version $Revision$
|
||||
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
|
||||
*/
|
||||
class Doctrine_Query extends Doctrine_Hydrate2 implements Countable
|
||||
class Doctrine_Query extends Doctrine_Hydrate implements Countable
|
||||
{
|
||||
/**
|
||||
* @param array $subqueryAliases the table aliases needed in some LIMIT subqueries
|
||||
|
Loading…
Reference in New Issue
Block a user