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');