From b3454638c73f68ca65c13a6b6894b30fec9a017a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Kuz=CC=87dowicz?= Date: Mon, 15 Jan 2018 15:43:27 +0100 Subject: [PATCH] Fix Collection class. --- Collection.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Collection.php b/Collection.php index b13b0a5..6eb433b 100644 --- a/Collection.php +++ b/Collection.php @@ -117,7 +117,7 @@ public function insertMany(array $documents, array $options = []) ); } - $res = $this->collection->insertOne($documents, $options); + $res = $this->collection->insertMany($documents, $options); if($this->client->enableProfiling){ Yii::endProfile( @@ -174,7 +174,7 @@ public function updateMany($filter, $update, array $options = []) Yii::beginProfile($token, 'mongoyii\Collection.updateMany'); } - $res = $this->collection->updateOne($filter, $update, $options); + $res = $this->collection->updateMany($filter, $update, $options); if($this->client->enableProfiling){ Yii::endProfile($token, 'mongoyii\Collection.updateMany');