Skip to content

Commit

Permalink
Merge pull request #8 from luciomartinez/master
Browse files Browse the repository at this point in the history
Fixes #7 - Use insertMany instead of create to save documents in order
  • Loading branch information
kennethklee authored Jun 7, 2018
2 parents 7ca8717 + d5b1098 commit d6d8feb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var fixtures = module.exports = function(dataset, db, callback) {
var model = db.model(tableName);

if (model) {
model.create(dataset[tableName], function(err) {
model.insertMany(dataset[tableName], function(err) {
done(err, Array.prototype.slice.call(arguments, 1));
});
} else {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-mongoose-fixtures",
"version": "0.2.4",
"version": "0.3.0",
"description": "Easy way to create mongoose fixtures.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit d6d8feb

Please sign in to comment.