@@ -67,10 +67,6 @@ class Watch implements Executable
67
67
* Insert and replace operations always include the "fullDocument" field
68
68
* and delete operations omit the field as the document no longer exists.
69
69
*
70
- * * session (MongoDB\Driver\Session): Client session.
71
- *
72
- * Sessions are not supported for server versions < 3.6.
73
- *
74
70
* * maxAwaitTimeMS (integer): The maximum amount of time for the server to
75
71
* wait on new documents to satisfy a change stream query.
76
72
*
@@ -83,6 +79,10 @@ class Watch implements Executable
83
79
* * resumeAfter (document): Specifies the logical starting point for the
84
80
* new change stream.
85
81
*
82
+ * * session (MongoDB\Driver\Session): Client session.
83
+ *
84
+ * Sessions are not supported for server versions < 3.6.
85
+ *
86
86
* @param string $databaseName Database name
87
87
* @param string $collectionName Collection name
88
88
* @param array $pipeline List of pipeline operations
@@ -148,7 +148,7 @@ private function createAggregate()
148
148
$ pipeline = $ this ->pipeline ;
149
149
array_unshift ($ pipeline , $ changeStream );
150
150
151
- $ aggregateOptions = array_intersect_key ($ this ->options , ['batchSize ' => 1 , 'collation ' => 1 , 'maxAwaitTimeMS ' => 1 , 'readConcern ' => 1 , 'readPreference ' => 1 ]);
151
+ $ aggregateOptions = array_intersect_key ($ this ->options , ['batchSize ' => 1 , 'collation ' => 1 , 'maxAwaitTimeMS ' => 1 , 'readConcern ' => 1 , 'readPreference ' => 1 , ' session ' => 1 ]);
152
152
153
153
return new Aggregate ($ this ->databaseName , $ this ->collectionName , $ pipeline , $ aggregateOptions );
154
154
}
0 commit comments