From a8c65c70d0e68f36afd4a4534bce40d9098cd20a Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Thu, 8 Feb 2018 10:15:46 -0500 Subject: [PATCH] PHPLIB-325: Apply Collection typeMap to change streams --- src/Collection.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Collection.php b/src/Collection.php index 93839d68c..c2931d46f 100644 --- a/src/Collection.php +++ b/src/Collection.php @@ -967,6 +967,10 @@ public function watch(array $pipeline = [], array $options = []) $options['readConcern'] = $this->readConcern; } + if ( ! isset($options['typeMap'])) { + $options['typeMap'] = $this->typeMap; + } + $operation = new Watch($this->manager, $this->databaseName, $this->collectionName, $pipeline, $options); return $operation->execute($server);