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 = [])
292292 }
293293 $ options = [];
294294
295- // Apply order, offset, limit and hint
295+ // Apply order, offset, limit and projection
296296 if ($ this ->timeout ) $ options ['maxTimeMS ' ] = $ this ->timeout ;
297297 if ($ this ->orders ) $ options ['sort ' ] = $ this ->orders ;
298298 if ($ this ->offset ) $ options ['skip ' ] = $ this ->offset ;
299299 if ($ this ->limit ) $ options ['limit ' ] = $ this ->limit ;
300+ if ($ columns ) $ options ['projection ' ] = $ columns ;
300301 // if ($this->hint) $cursor->hint($this->hint);
301302
302303 // Fix for legacy support, converts the results to arrays instead of objects.
@@ -891,7 +892,7 @@ protected function compileWheres()
891892 // Convert DateTime values to UTCDateTime.
892893 if (isset ($ where ['value ' ]) and $ where ['value ' ] instanceof DateTime)
893894 {
894- $ where ['value ' ] = new UTCDateTime ($ where ['value ' ]->getTimestamp ());
895+ $ where ['value ' ] = new UTCDateTime ($ where ['value ' ]->getTimestamp () * 1000 );
895896 }
896897
897898 // 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