title: sequelize defining a foreignKey association to another model using targetKey
body: <p>As per the docs, I can create a foreignKey to another model to a specific column using targetKeys option.  I am trying to do this in my below models:</p>
  
  <pre><code>module.exports = function(sequelize, DataTypes) {
    var Booking = sequelize.define("Booking", {
      //id:           {type:DataTypes.INTEGER, primaryKey:true},        // auto-generate
      bookingId:      {type:DataTypes.INTEGER, primaryKey:true},
      accId:          {type:DataTypes.INTEGER},
      description:    {type:DataTypes.STRING(128)},
      amount:         {type:DataTypes.DECIMAL(15,2), allowNull:false},  // 0:prepaid, 1:postpaid
      schDate:        {type:DataTypes.DATE, allowNull:false},
      createdBy:      {type:DataTypes.INTEGER, allowNull:false},
      modifiedBy:     {type:DataTypes.INTEGER, allowNull:false}
    },
    {
      tableName: "user_bookings",
      timestamps: true,
      paranoid: true,
      classMethods: {
        associate: function(models) {
          Booking.belongsTo(models.Account, {foreignKey:'accId', targetKey:'accId'});
        }
      }
    }
  );
    return Booking;
  };
  </code></pre>
  
  <p>And my <em>other</em> table looks like this:</p>
  
  <pre><code>   module.exports = function(sequelize, DataTypes) {
    var Account = sequelize.define("Account", {
      //id:           {type:DataTypes.INTEGER, primaryKey:true},                  // auth-generate
     userId:         {type:DataTypes.INTEGER, primaryKey:true},
      accType:        {type:DataTypes.CHAR(1), allowNull:false},                  // 0:prepaid, 1:postpaid
      category:       {type:DataTypes.INTEGER},                                   // reserved for future use
      isDefault:      {type:DataTypes.BOOLEAN, defaultValue:false},               // Is this the default wallet, (if the user has many wallets. )
      balance:        {type:DataTypes.DECIMAL(15,2), defaultValue:null},
      creditLimit:    {type:DataTypes.DECIMAL(15,2), defaultValue:null},
      creditConsumed: {type:DataTypes.DECIMAL(15,2), defaultValue:null},
      createdBy:      {type:DataTypes.INTEGER, allowNull:false},
      modifiedBy:     {type:DataTypes.INTEGER, allowNull:false},
      createdAt:      {type:DataTypes.DATE, allowNull:false, get:function(){return this.getDataValue('createdAt').getTime()/1000;}},
      updatedAt:      {type:DataTypes.DATE, allowNull:false, get:function(){return this.getDataValue('updatedAt').getTime()/1000;}}
    },
    {
      tableName: "user_accounts",
      timestamps: true,
      paranoid: true,
    }
  );
    return Account;
  };
  </code></pre>
  
  <p>When these tables are created, I am expecting that the first model will have a foreignKey created to the 2nd one.  But that is not happening.</p>
  
  <p>My user_bookings table shows as a standalone table without any references:</p>
  
  <pre><code>mysql&gt; desc user_bookings;
  +-------------+---------------+------+-----+---------+-------+
  | Field       | Type          | Null | Key | Default | Extra |
  +-------------+---------------+------+-----+---------+-------+
  | bookingId   | int(11)       | NO   | PRI | 0       |       |
  | accId       | int(11)       | YES  |     | NULL    |       |
  | description | varchar(128)  | YES  |     | NULL    |       |
  | amount      | decimal(15,2) | NO   |     | NULL    |       |
  | schDate     | datetime      | NO   |     | NULL    |       |
  | createdBy   | int(11)       | NO   |     | NULL    |       |
  | modifiedBy  | int(11)       | NO   |     | NULL    |       |
  | createdAt   | datetime      | NO   |     | NULL    |       |
  | updatedAt   | datetime      | NO   |     | NULL    |       |
  | deletedAt   | datetime      | YES  |     | NULL    |       |
  +-------------+---------------+------+-----+---------+-------+
  10 rows in set (0.01 sec) 
  </code></pre>
  
  <p>What am I doing wrong here?  Thanks in advance...</p>