title: Sequelize set alias attributes name after join
body: <p>After a join operation among three models I received a valid result but I would rename the attributes generated by the join operation of the findAll </p>
  
  <p><strong>Query:</strong></p>
  
  <pre><code>const orchards = await db.Area.findAll({
          include: [db.AreaCoordinate, db.Crop],
          attributes: ['id', 'name']
        });
  </code></pre>
  
  <p><strong>AreaCoordinate Model:</strong></p>
  
  <pre><code>module.exports = function (sequelize, DataTypes) {
  
    var AreaCoordinate = sequelize.define('AreaCoordinate', {
      latitude: {
        type: DataTypes.STRING(45),
        allowNull: true
      },
      longitude: {
        type: DataTypes.STRING(45),
        allowNull: true
      }
    }, {
      classMethods: {
        associate: function (models) {
          AreaCoordinate.belongsTo(models.Area, {foreignKey: 'areaId'});
        }
      }
    });
  
    return AreaCoordinate;
  };
  </code></pre>
  
  <p><strong>Crop Model:</strong></p>
  
  <pre><code>module.exports = function (sequelize, DataTypes) {
  
    var Crop = sequelize.define('Crop', {
      name: {
        type: DataTypes.STRING(45),
        allowNull: true
      },
      lang: {
        type: DataTypes.STRING(45),
        allowNull: true
      }
    }, {
      classMethods: {
        associate: function (models) {
          Crop.hasMany(models.Area, {foreignKey:'cropId'})
        }
      }
    });
  
    return Crop;
  };
  </code></pre>
  
  <p><strong>Area Model:</strong></p>
  
  <pre><code>module.exports = function (sequelize, DataTypes) {
  
    var Area = sequelize.define('Area', {
      name: DataTypes.STRING
    }, {
      classMethods: {
        associate: function (models) {
          // example on how to add relations
          Area.belongsTo(models.Crop, {foreignKey: 'cropId'});
          Area.belongsTo(models.Orchard, {as: 'orchard'});
          Area.hasMany(models.AreaCoordinate, {foreignKey:'areaId'})
        }
      }
    });
  
    return Area;
  };
  </code></pre>
  
  <p>I would receive from the query a JSON like this:</p>
  
  <pre><code>{
      "status": 200,
      "status_message": "OK",
      "data": {
          "orchard": [
              {
                  "name": "pantano",
                  "coordinates": [
                      {
                          "id": 115,
                          "latitude": "1",
                          "longitude": "2",
                          "createdAt": "2017-08-29T12:03:11.000Z",
                          "updatedAt": "2017-08-29T12:03:11.000Z",
                          "areaId": 28
                      },
                      {
                          "id": 116,
                          "latitude": "1",
                          "longitude": "2",
                          "createdAt": "2017-08-29T12:03:11.000Z",
                          "updatedAt": "2017-08-29T12:03:11.000Z",
                          "areaId": 28
                      }
                  ],
                  "cropId": 10
              }
          ]
      }
  }
  </code></pre>
  
  <p>But what I receive is (look AreaCoordinates and Crop):</p>
  
  <pre><code>{
      "status": 200,
      "status_message": "OK",
      "data": {
          "orchard": [
              {
                  "name": "pantano",
                  "AreaCoordinates": [
                      {
                          "id": 115,
                          "latitude": "1",
                          "longitude": "2",
                          "createdAt": "2017-08-29T12:03:11.000Z",
                          "updatedAt": "2017-08-29T12:03:11.000Z",
                          "areaId": 28
                      },
                      {
                          "id": 116,
                          "latitude": "1",
                          "longitude": "2",
                          "createdAt": "2017-08-29T12:03:11.000Z",
                          "updatedAt": "2017-08-29T12:03:11.000Z",
                          "areaId": 28
                      }
                  ],
                  "Crop": 10
              }
          ]
      }
  }
  </code></pre>
  
  <p>I tried to set some alias for <strong>AreaCoordinates</strong> and <strong>Crop</strong> but I couldn't find a solution. Thank you in advance for your support.</p>