Commit 850bc18e authored by Jens Segers's avatar Jens Segers

Merge pull request #436 from lennynyktyk/mongo30-distinct

Fixed serialization issue when connecting to MongoDB 3.0
parents 6f736339 3bb1343d
...@@ -220,7 +220,14 @@ class Builder extends BaseBuilder { ...@@ -220,7 +220,14 @@ class Builder extends BaseBuilder {
$column = isset($this->columns[0]) ? $this->columns[0] : '_id'; $column = isset($this->columns[0]) ? $this->columns[0] : '_id';
// Execute distinct // Execute distinct
$result = $this->collection->distinct($column, $wheres); if ($wheres)
{
$result = $this->collection->distinct($column, $wheres);
}
else
{
$result = $this->collection->distinct($column);
}
return $result; return $result;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment