title: Sequelize Query Failing
body: <p>I have a model that has same model associated twice. Below is the model definition</p>
  
  <pre><code>const RiStockSplitType = sequelize.define("RiStockSplitType",
      // Columns
      base.addColumns({
          "id": {type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true},
          "splitType": {type: DataTypes.INTEGER, defaultValue: 1, field: "split_type"}
      }, DataTypes),
      // Configs
      new base.DefaultModelConfig("table")
  );
  RiStockSplitType.associate = function (models, value) {
      value.belongsTo(models.ReservationInfo, {
          foreignKey: {
              allowNull: false,
              name:"reservation_info_id"
          },
          as: "reservation_info"
      });
      value.belongsTo(models.ReservationInfo, {
          foreignKey: {
              allowNull: false,
              name:"split_type_ri_id"
          },
          as:"split_type_ri"
      });
  };
  return RiStockSplitType;
  </code></pre>
  
  <p>Below is the SequelizeQuery that I am firing</p>
  
  <pre><code> RiStockSplitType.findAll({
          include: [{
              model: ReservationInfo,
              as:"reservation_info"
          }],
      })
  )}).then(function(){console.log(arguments)}).catch(err =&gt; {console.error('ERROR:', err);});
  </code></pre>
  
  <p>The SQL Query generated by the above is</p>
  
  <pre><code>Executing (default): SELECT `RiStockSplitType`.`id`, `RiStockSplitType`.`split_type` AS `splitType`, `RiStockSplitType`.`created_on` AS `createdOn`, `RiStockSplitType`.`updated_on` AS `updatedOn`, `RiStockSplitType`.`reservation_info_id`, `RiStockSplitType`.`split_type_ri_id`, `reservation_info`.`id` AS `reservation_info.id`, `reservation_info`.`created_on` AS `reservation_info.createdOn`, `reservation_info`.`updated_on` AS `reservation_info.updatedOn`, `reservation_info`.`city_id` AS `reservation_info.city_id` FROM `warehouse_ristocksplittype` AS `RiStockSplitType` LEFT OUTER JOIN `warehouse_reservation_info` AS `reservation_info` ON `RiStockSplitType`.`reservation_info_id` = `reservation_info`.`id`;
  </code></pre>
  
  <p>And the error I get is </p>
  
  <pre><code>  SequelizeDatabaseError: Unknown column 'reservation_info.city_id' in 'field list'
  </code></pre>
  
  <p>I am using Sequelize v4 and Node 6.9.5.
  I am unable to figure out the reason for the error. The column mentioned in the error is <code>reservation_info.city_id</code> is there in the Database</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Model definiton for ReservationInfo</p>
  
  <pre><code>const ReservationInfo = sequelize.define("ReservationInfo",
      // Columns
      base.addColumns({
          "id": {type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true},
      }, DataTypes),
      // Configs,
      new base.DefaultModelConfig("warehouse_reservationinfo"));
  
  ReservationInfo.associate = function (models, value) {
      value.belongsTo(models.City, {
          foreignKey: {
              allowNull: false,
              name: 'city_id'
          }
      });
  };
  return ReservationInfo;
  </code></pre>