Commit 4d1a7fa2 authored by Dimasdanz's avatar Dimasdanz

Fix normal query projection

parent 1826784b
......@@ -285,18 +285,14 @@ class Builder extends BaseBuilder {
$columns[$column] = true;
}
// Add custom projections.
if ($this->projections)
{
$columns = array_merge($columns, $this->projections);
}
$options = [];
// Apply order, offset, limit and hint
// Apply order, offset, limit and projection
if ($this->timeout) $options['maxTimeMS'] = $this->timeout;
if ($this->orders) $options['sort'] = $this->orders;
if ($this->offset) $options['skip'] = $this->offset;
if ($this->limit) $options['limit'] = $this->limit;
if ($this->projections) $options['projection'] = $this->projections;
// if ($this->hint) $cursor->hint($this->hint);
// Fix for legacy support, converts the results to arrays instead of objects.
......
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