title: Associations in sequelize not working as intended
body: <p>I am attempting to output a nested relation where</p>
  
  <p>Cat.hasMany(legs)</p>
  
  <p>Leg.belongsTo(cat)</p>
  
  <p>Leg.hasOne(paw)</p>
  
  <p>paw.hasMany(leg)</p>
  
  <p>Here is my Cat Model:</p>
  
  <pre><code>module.exports = (sequelize, DataTypes) =&gt; {
    const Cat = sequelize.define('Cat', {
      userId: {
        type: DataTypes.STRING,
      },
    }, {});
  
    Cat.associate = function (models) {
      Cat.hasMany(models.Leg, {
        foreignKey: 'catId',
        as: 'legs',
      });
    };
    return Cat;
  };
  </code></pre>
  
  <p>My Legs Model:</p>
  
  <pre><code>module.exports = (sequelize, DataTypes) =&gt; {
    const Leg = sequelize.define('Leg', {
      originalValue: DataTypes.JSON,
      newValue: DataTypes.JSON,
      legId: DataTypes.INTEGER,
      objectId: DataTypes.INTEGER,
      pawId: DataTypes.INTEGER,
    }, {});
  
    Leg.associate = function (models) {
      Leg.belongsTo(models.Cat, {
        foreignKey: 'LegId',
        onDelete: 'CASCADE',
      });
      Leg.hasOne(models.Paw, {
        foreignKey: 'pawId',
      });
    };
    return Leg;
  };
  </code></pre>
  
  <p>Here is my Paw model</p>
  
  <pre><code>module.exports = (sequelize, DataTypes) =&gt; {
    const Paw = sequelize.define('Paw', {
      pawType: DataTypes.STRING,
    }, {});
    Paw.associate = function (models) {
      Paw.hasMany(models.Leg, {
        foreignKey: 'pawId',
        as: 'paws',
      });
    };
    return Paw;
  };
  </code></pre>
  
  <p>Currently My code is outputting this when i query the Cat Table</p>
  
  <pre><code>[
      {
          "id": 1,
          "userId": "2wdfs",
          "createdAt": "2018-04-14T20:12:47.112Z",
          "updatedAt": "2018-04-14T20:12:47.112Z",
          "legs": [
              {
                  "id": 1,
                  "catId": 1,
                  "pawId": 1,
                  "createdAt": "2018-04-14T20:12:54.500Z",
                  "updatedAt": "2018-04-14T20:12:54.500Z"
              }
          ]
      }
  ]
  </code></pre>
  
  <p>However I would like the pawType from the paws table to also be present when listing everything from the cat table. Something more along the lines of this:</p>
  
  <pre><code>[
      {
          "id": 1,
          "userId": "2wdfs",
          "createdAt": "2018-04-14T20:12:47.112Z",
          "updatedAt": "2018-04-14T20:12:47.112Z",
          "legs": [
              {
                  "id": 1,
                  "catId": 1,
                  "paws" : [
                     {
                      "id": 1,
                      "pawType": "cute"
                     }
                  ]
                  "createdAt": "2018-04-14T20:12:54.500Z",
                  "updatedAt": "2018-04-14T20:12:54.500Z"
              }
          ]
      }
  ]
  </code></pre>
  
  <p>Additionally, Here is the query I am using to retrieve the Cats.</p>
  
  <pre><code>return Cat.findAll({ include: [{ model: Leg, as: 'legs',include [{model: Paw,}], }], })
  </code></pre>
  
  <p>This is the error that is returning,</p>
  
  <pre><code>{ SequelizeDatabaseError: column legs-&gt;Paw.pawId does not exist
  { error: column legs-&gt;Paw.pawId does not exist
  </code></pre>
  
  <p>And the full SQL command</p>
  
  <pre><code>   sql: 'SELECT "Cat"."id", "Cat"."userId", "Cat"."createdAt", "Cat"."updatedAt", "legs"."id" AS "legs.id", "legs"."originalValue" AS "legs.originalValue", "legs"."newValue" AS "legs.newValue", "legs"."catId" AS "legs.catId", "legs"."objectId" AS "legs.objectId", "legs"."pawId" AS "legs.pawId", "legs"."createdAt" AS "legs.createdAt", "legs"."updatedAt" AS "legs.updatedAt", "legs-&gt;Paw"."id" AS "legs.Paw.id", "legs-&gt;Paw"."paw" AS "legs.Paw.paw", "legs-&gt;Paw"."pawId" AS "legs.Paw.pawId", "legs-&gt;Paw"."createdAt" AS "legs.Paw.createdAt", "legs-&gt;Paw"."updatedAt" AS "legs.Paw.updatedAt" FROM "Cats" AS "Cat" LEFT OUTER JOIN "Legs" AS "legs" ON "Cat"."id" = "legs"."catId" LEFT OUTER JOIN "Paws" AS "legs-&gt;Paw" ON "legs"."id" = "legs-&gt;Paw"."pawId";' },
  </code></pre>