Skip to content
This repository has been archived by the owner on Nov 11, 2020. It is now read-only.

Commit

Permalink
Fix cursor creation when MR's db output option is used
Browse files Browse the repository at this point in the history
  • Loading branch information
jmikola committed Aug 2, 2013
1 parent a21645a commit 114a0ae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Doctrine/MongoDB/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,12 @@ protected function doMapReduce($map, $reduce, array $out, array $query, array $o
return new ArrayIterator($result['results']);
}

if (isset($result['result']['db'], $result['result']['collection'])) {
return $this->connection
->selectCollection($result['result']['db'], $result['result']['collection'])
->find();
}

return $this->database->selectCollection($result['result'])->find();
}

Expand Down

0 comments on commit 114a0ae

Please sign in to comment.