title: sequelize: association is referencing to wrong foreignKey column name
body: <p>I'm struggling with this problem for hours, i cannot seem to find a fix to this confusing error. I am trying to make a query with joined table and show result with nested object.</p>
  
  <p>So the tables are like this: <code>blogs</code> table is associated to <code>accounts</code> table through foreign key <code>accounts_id</code> on <code>blogs</code> table, this seems to be an easy join query, but i cannot make sequelize use the right foreign key column name as it thinks the foreign key is called as <code>account_id</code></p>
  
  <p>The models are defined this way:</p>
  
  <p>accounts: </p>
  
  <pre><code>module.exports = function(sequelize, DataTypes) {
      return sequelize.define('accounts', {
          id: {
              type: DataTypes.INTEGER(11),
              allowNull: false,
              primaryKey: true,
              autoIncrement: true
          },
          username: {
              type: DataTypes.STRING,
              allowNull: false
          },
          ............
      }, {
          tableName: 'accounts',
          timestamps: false,
          freezeTableName: true
      });
  </code></pre>
  
  <p>blogs:</p>
  
  <pre><code>module.exports = function(sequelize, DataTypes){
      var model = sequelize.define("blogs", {
          id: {
              type: DataTypes.INTEGER(11),
              allowNull: false,
              primaryKey: true,
              autoIncrement: true
          },
          title: {
              type: DataTypes.STRING,
              allowNull: false,
          },
          content: {
              type: DataTypes.STRING,
              allowNull: false
          },
          accounts_id: {
              type: DataTypes.INTEGER,
              allowNull: false,
          },
          ............
      }, {
          tableName: "blogs",
          timestamps: false,
          underscored: true
      });
  
      model.belongsTo(sequelize.models.accounts);
      sequelize.models.accounts.hasMany(model, {targetKey: "accounts_id"});
  
      return model;
  };
  </code></pre>
  
  <p>and the query is like this:</p>
  
  <pre><code>var criteria = {
      include: [$db.models.accounts]
  };
  
  return model.findAll(criteria);
  </code></pre>
  
  <p>but it throws <code>Error: ER_BAD_FIELD_ERROR: Unknown column 'blogs.account_id' in 'field list'</code></p>