-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.6.2
-
Component/s: Aggregation Framework
-
None
-
ALL
I have upgraded my MongoDB version from 3.4 to 3.6 and my PHP driver version is "1.6.8"
Below query works fine on version 3.4 but now giving error "The 'cursor' option is required, except for aggregate with the explain argument".
$cursor=$collection_discussion->aggregate([ [ '$match' => ['_id' => $discussion_id]], [ '$project' => [ 'comments'=> [ '$filter' => [ 'input'=> '$comments', 'as'=> 'comment', 'cond' => [ '$eq' => [ '$$comment.group_id',$group_id ] ] ] ] ] ],[ '$project' => [ 'comments'=> [ '$slice' => [ [ '$slice' => [ '$comments', [ '$subtract' => [ [ '$size' => [ '$comments' ] ], $list_count ] ] ] ], $lastRecordsLimit ] ] ] ] ]);
- is related to
-
SERVER-38234 The 'cursor' option is required.. even if it is set
- Closed