Skip to content

Commit

Permalink
[MODM-35] Fixes issue with already initialized proxies being included…
Browse files Browse the repository at this point in the history
… in the query when collection is initialized.
  • Loading branch information
jwage committed Aug 7, 2010
1 parent 935759b commit 236d4c6
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ protected function _initialize()
if ( ! $this->_initialized) {
$groupedIds = array();
foreach ($this->_coll as $document) {
// Skip initialized proxy documents, no need to fetch them
if ($document instanceof Proxy && $document->__isInitialized__ === true) {
continue;
}
$class = $this->_dm->getClassMetadata(get_class($document));
$ids[$class->name][] = $class->getIdentifierObject($document);
}
Expand Down

0 comments on commit 236d4c6

Please sign in to comment.