title: Sequelize belongs to many get both relations in one query
body: <p>I have belongs to many associations of the model User and Project. What is the simplest way, given a user id, query such that we have all projects that a user has, and all users of each project? My current method is quite complicated and involves two separate queries followed by parsing with Javascript. I think I'm missing some important step which could simplify the whole process. Below is the REST API response which I hope to return to the end user.</p>
  
  <pre><code>{
      "user_id": "wru09asf",
      "projects": [
          {
              "id": "project_id",
              "content": "Final Year Project",
              "users": [
                  {
                      "id": "user_id",
                      "role": "Creator"
                  }
              ]
          }
      ]
  }
  </code></pre>
  
  <p>Currently I'm doing </p>
  
  <pre><code>// first function, get all projects
  User.findById(user_id).then(function(user) {
      user.getProjects({
  
      });
  });
  
  
  // second function, get all users of each project returned
  
  for each project returned, do
     Project.findById(project_id).then(function(project) {
         project.getUsers();
     });
  
  // third function
  Combine the two responses using Javascript to get the final API response. 
  </code></pre>
  
  <p>Sequelize models:</p>
  
  <pre><code>//User (all models are underscored named)
  sequelize.define('users', {
          id: {
              type: DataTypes.STRING,
              primaryKey: true
          },
          password: DataTypes.STRING,
          salt: DataTypes.STRING,
          email: {
              type: DataTypes.STRING,
              unique: true
          }
      });
  // Project
  sequelize.define('projects', {
          id: {
              type: DataTypes.STRING,
              primaryKey: true
          },
          content: DataTypes.TEXT
      });
  // UserProject
  sequelize.define('user_project', {
          role: DataTypes.STRING
      });
  </code></pre>
  
  <p>Relations:</p>
  
  <pre><code>User.belongsToMany(Project, {through: UserProject});
  Project.belongsToMany(User, {through: UserProject});
  </code></pre>