bredikhin / barrels

Simple DB Fixtures for Sails.js
MIT License
85 stars 34 forks source link

populate fixtures got error in Sails test #42

Open chenweiyj opened 8 years ago

chenweiyj commented 8 years ago

When I use this library to populate fixture data for my sails app, I got error as follows.

model[attr] = that.idMap[joined][item[attr]-1];
                                              ^
TypeError: Cannot read property '0' of undefined
bredikhin commented 8 years ago

Please provide example fixture files, test code, etc.

srhlv commented 8 years ago

This may means you didn't add fixture file name into loadOrder argument. Just debugged same.

barrels.populate(loadOrder, function(err) {
        done(err, sails);
      });

I think there is lack of logging in module.