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 = [])
235
235
$ wheres = $ this ->compileWheres ();
236
236
237
237
// 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 ) {
239
239
$ group = [];
240
240
$ unwinds = [];
241
241
@@ -279,15 +279,7 @@ public function getFresh($columns = [])
279
279
}
280
280
}
281
281
}
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
+
291
283
// The _id field is mandatory when using grouping.
292
284
if ($ group && empty ($ group ['_id ' ])) {
293
285
$ group ['_id ' ] = null ;
You can’t perform that action at this time.
0 commit comments