File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
src/Jenssegers/Mongodb/Query Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ public function getFresh($columns = [])
235235 $ wheres = $ this ->compileWheres ();
236236
237237 // Use MongoDB's aggregation framework when using grouping or aggregation functions.
238- if ($ this ->groups || $ this ->aggregate || $ this -> paginating ) {
238+ if ($ this ->groups || $ this ->aggregate ) {
239239 $ group = [];
240240 $ unwinds = [];
241241
@@ -279,15 +279,7 @@ public function getFresh($columns = [])
279279 }
280280 }
281281 }
282-
283- // When using pagination, we limit the number of returned columns
284- // by adding a projection.
285- if ($ this ->paginating ) {
286- foreach ($ this ->columns as $ column ) {
287- $ this ->projections [$ column ] = 1 ;
288- }
289- }
290-
282+
291283 // The _id field is mandatory when using grouping.
292284 if ($ group && empty ($ group ['_id ' ])) {
293285 $ group ['_id ' ] = null ;
You can’t perform that action at this time.
0 commit comments