title: Multiple Sequelize Associations
body: <p>I have a few associations between models like so: </p>
  
  <pre><code>Patient.hasMany(Transaction, {
      as: 'transactions',
      foreignKey: 'patient_id',
      sourceKey: 'id'
  });
  
  Transaction.belongsTo(Patient, {
      as: 'patient',
      foreignKey: 'patient_id',
      targetKey: 'id'
  });
  
  Transaction.hasMany(Transaction, {
      as: 'transactions',
      foreignKey: 'item_to_pay',
      sourceKey: 'id'
  });
  </code></pre>
  
  <p>I'm writing a query to get a list of transactions that belong to a patient and include the models associated with them:</p>
  
  <pre><code>Transaction.findAll({
      where: {
          patient_id: 1
      },
      include: [{
          model: Patient,
          as: 'patient',
          attributes: ['first_name']
      }, {
          model: Transaction,
          as: 'transactions',
          include: [{
              model: Patient,
              as: 'patient',
              attributes: ['first_name']
          }]
      }],
  });
  </code></pre>
  
  <p>However when the result returns, it does not include the second nested patient model as I expect it to.</p>
  
  <p>I've also tried writing a different query to see if I can get the desired result:</p>
  
  <pre><code>Transaction.findAll({
      where: {
          patient_id: 1
      },
      include: [{
          model: Transaction,
          as: 'transactions',
          include: [{
              model: Patient,
              as: 'patient',
              attributes: ['first_name']
          }]
      }],
  });
  </code></pre>
  
  <p>But this query errors out and returns 'Unknown column 'patient.id' in field list'.</p>
  
  <p>Does anyone see something wrong with my query or associations? Is there something I'm not understanding about the associations here?</p>