title: sequelize get column value of referenced table
body: <p>I have three tables meetings, rooms and projects</p>
  <pre><code>meetings.belongsTo(models.rooms, { foreignKey: &quot;room_id&quot; , targetKey: &quot;id&quot;});
  rooms.hasMany(models.meetings, { foreignKey : &quot;id&quot;, targetKey : &quot;room_id&quot;});
  rooms.belongsTo(models.projects, { foreignKey: &quot;project_id&quot;, targetKey: &quot;id&quot;});
  projects.hasMany(models.rooms,  {foreignKey:&quot;id&quot;, targetKey:&quot;project_id&quot;});
  </code></pre>
  <p>id, room_id and project_id are primary key of their respective table.
  I want to find value of some column of projects for a particular meeting id. How to write a single query using sequelize nodejs to do this?
  below query need to execute using sequelize which is giving correct result</p>
  <pre><code>select project_meta from projects  p
  inner join rooms  r on p.id = r.project_id
  inner join  meetings  m on  r.id = m.room_id
  where  m.id = &quot;QBZJ0TK7V6NFSPPWGFNCN&quot;;
  </code></pre>
  <p>wrote following</p>
  <pre><code>projects.findAll({
      include: [{
          model: rooms,
          include: [{
              model: meetings,
              where: {
                  id: &quot;QBZJ0TK7V6NFSPPWGFNCN&quot;
              }
          }]
      }],
      attributes: ['project_meta']
  }
  </code></pre>
  <p>but it is executing different query and giving unexpected result</p>
  <p>is there any problem with association?</p>