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 3bddd4b commit 3bb1343Copy full SHA for 3bb1343
src/Jenssegers/Mongodb/Query/Builder.php
@@ -224,7 +224,14 @@ public function getFresh($columns = array())
224
$column = isset($this->columns[0]) ? $this->columns[0] : '_id';
225
226
// Execute distinct
227
- $result = $this->collection->distinct($column, $wheres);
+ if ($wheres)
228
+ {
229
+ $result = $this->collection->distinct($column, $wheres);
230
+ }
231
+ else
232
233
+ $result = $this->collection->distinct($column);
234
235
236
return $result;
237
}
0 commit comments