We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1ee99e commit 07b0932Copy full SHA for 07b0932
src/Jenssegers/Mongodb/Builder.php
@@ -153,7 +153,7 @@ public function getFresh($columns = array('*'))
153
if ($this->limit) $cursor->limit($this->limit);
154
155
// Return results
156
- return array_values(iterator_to_array($cursor));
+ return iterator_to_array($cursor, false);
157
}
158
159
tests/QueryTest.php
@@ -64,6 +64,7 @@ public function testSubKey()
64
65
$users = DB::collection('users')->where('address.country', 'Belgium')->get();
66
$this->assertEquals(1, count($users));
67
+ $this->assertEquals('John Doe', $users[0]['name']);
68
69
70
0 commit comments