@@ -67,10 +67,6 @@ class Watch implements Executable
6767 * Insert and replace operations always include the "fullDocument" field
6868 * and delete operations omit the field as the document no longer exists.
6969 *
70- * * session (MongoDB\Driver\Session): Client session.
71- *
72- * Sessions are not supported for server versions < 3.6.
73- *
7470 * * maxAwaitTimeMS (integer): The maximum amount of time for the server to
7571 * wait on new documents to satisfy a change stream query.
7672 *
@@ -83,6 +79,10 @@ class Watch implements Executable
8379 * * resumeAfter (document): Specifies the logical starting point for the
8480 * new change stream.
8581 *
82+ * * session (MongoDB\Driver\Session): Client session.
83+ *
84+ * Sessions are not supported for server versions < 3.6.
85+ *
8686 * @param string $databaseName Database name
8787 * @param string $collectionName Collection name
8888 * @param array $pipeline List of pipeline operations
@@ -148,7 +148,7 @@ private function createAggregate()
148148 $ pipeline = $ this ->pipeline ;
149149 array_unshift ($ pipeline , $ changeStream );
150150
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 ]);
152152
153153 return new Aggregate ($ this ->databaseName , $ this ->collectionName , $ pipeline , $ aggregateOptions );
154154 }
0 commit comments