Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

db parameter of the load function is required #21

Open
antoineverger opened this issue Apr 2, 2014 · 4 comments
Open

db parameter of the load function is required #21

antoineverger opened this issue Apr 2, 2014 · 4 comments

Comments

@antoineverger
Copy link

I might be wrong but it appears that if you use load('/path/to/directory') without specifying the db parameter, it does not work. After having a look at the code base, it seems that if you don't specify it, the db parameter is never set.

@hacking-robot
Copy link

same problem, I tried everything and did not manage to make it worked at all.

@hacking-robot
Copy link

alright, I finally found. The process does not exit on complete.
Here is an example of working test:

var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/mydb');

require('./models/category.js');

var fixtures = require('pow-mongoose-fixtures');

// load categories fixtures
fixtures.load(__dirname + '/fixtures/categories.js', mongoose, function(err) {
    console.log(err||'done');
});

@osukaa
Copy link

osukaa commented Jan 21, 2015

@david-soyez God bless! We were struggling with that load problem.

@zeel
Copy link

zeel commented May 28, 2017

We can update README with the updated documentation - including db parameter. Let me know if I can open PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants