Details
-
Bug
-
Resolution: Works as Designed
-
Major - P3
-
None
-
3.6.2
-
None
-
ALL
Description
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
|
]
|
]
|
]
|
]
|
]);
|
Attachments
Issue Links
- is related to
-
SERVER-38234 The 'cursor' option is required.. even if it is set
-
- Closed
-