title: creating association with multiple foreign keys using sequelize.js
body: <p>I am looking to use sequelize.js to make one call and ping two tables.  </p>
  
  <p>I want my results to find the corresponding data within my second table that match with two foreign keys - 'timeperiod' and 'nodeid'</p>
  
  <p>Currently, regardless of different alias(s) - my query results in only matching the last foreign key I specify. Hence time period in this case. </p>
  
  <pre><code>associate: function (models) {
      models.belowOcfBudget.belongsTo(models.belowOcf, {
          foreignKey: 'nodeid',
          targetKey: 'nodeid',
          as: 'belowOcf_id'
      });
      models.belowOcfBudget.belongsTo(models.belowOcf, {
          foreignKey: 'timeperiod',
          targetKey: 'timeperiod',
          as: 'belowOcf_time'
      });
  }
  </code></pre>
  
  <p>Below is where i include this association in my router.</p>
  
  <pre><code>    BelowOCFBudget.findAll({
      raw: true,
      include:[{
          model: models.belowOcf,
          as: 'belowOcf_id'
      }],
      include:[{
          model: models.belowOcf,
          as: 'belowOcf_time'
      }]
  </code></pre>
  
  <p>how can I have my query execute and return me a data set from two tables that have matching timeperiod and id?</p>