File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/Jenssegers/Mongodb/Query Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -292,11 +292,12 @@ public function getFresh($columns = [])
292
292
}
293
293
$ options = [];
294
294
295
- // Apply order, offset, limit and hint
295
+ // Apply order, offset, limit and projection
296
296
if ($ this ->timeout ) $ options ['maxTimeMS ' ] = $ this ->timeout ;
297
297
if ($ this ->orders ) $ options ['sort ' ] = $ this ->orders ;
298
298
if ($ this ->offset ) $ options ['skip ' ] = $ this ->offset ;
299
299
if ($ this ->limit ) $ options ['limit ' ] = $ this ->limit ;
300
+ if ($ columns ) $ options ['projection ' ] = $ columns ;
300
301
// if ($this->hint) $cursor->hint($this->hint);
301
302
302
303
// Fix for legacy support, converts the results to arrays instead of objects.
@@ -891,7 +892,7 @@ protected function compileWheres()
891
892
// Convert DateTime values to UTCDateTime.
892
893
if (isset ($ where ['value ' ]) and $ where ['value ' ] instanceof DateTime)
893
894
{
894
- $ where ['value ' ] = new UTCDateTime ($ where ['value ' ]->getTimestamp ());
895
+ $ where ['value ' ] = new UTCDateTime ($ where ['value ' ]->getTimestamp () * 1000 );
895
896
}
896
897
897
898
// The next item in a "chain" of wheres devices the boolean of the
You can’t perform that action at this time.
0 commit comments