title: Sailsjs Barrels fixtures required associations
body: <p>I'm building Sails.js application and refactoring my tests to use Barrels fixtures. One of my model has required association. <a href="https://github.com/bredikhin/barrels" rel="nofollow">I read the instructions in Barrels repo</a> about required associations. Below is my code which I use to load the fixtures. I keep getting an error about not passing Project to Activity (Activity model has a required association to Project).</p>
  
  <pre><code>var barrels = Promise.promisifyAll(new Barrels(process.cwd() + '/test/fixtures'));
  
  return barrels.populateAsync(['project', 'integrations', 'user']).then(function() {
    return barrels.populateAsync(['activity']);
  }).catch(function(err) {
    console.log(err);
  });
  </code></pre>
  
  <p>I tried to switch automatic association off in second populate and it looks like that Activities are created but their project field will get plain number defined in fixtures. I don't really trust it being correct always even though I use sails-disk for testing db.</p>
  
  <p>So what is the problem here? Below is same code as one above but with callbacks wrapped into promise and auto-association switched off:</p>
  
  <pre><code>return new Promise(function (resolve) {
    var barrels = new Barrels(process.cwd() + '/test/fixtures');
  
    barrels.populate(['project', 'integrations', 'user'], function(err) {
      barrels.populate(['activity'], function(err) {
        resolve();
      }, false);
    });
  });
  </code></pre>