Skip to content

Commit

Permalink
Using insertMany instead of insertOne
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbasso committed Feb 15, 2017
1 parent 43ad3f5 commit 4ffd7ab
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/DataSet/DataSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ public function dropAllCollections() {
*/
public function buildCollections() {
foreach ($this->fixture as $collection => $data) {
foreach ($data as $entry) {
$this->connection->collection($collection)->insertOne($entry);
}
$this->connection->collection($collection)->insertMany($data);
}
return $this;
}
Expand Down

0 comments on commit 4ffd7ab

Please sign in to comment.