title: SequelizeJS: Batch setting foreign key
body: <p>I have two models, <code>Article</code> and <code>ArticleGroup</code>:</p>
  
  <pre><code>sequelize.define('article', {
    GROUP_CODE: {
      type: DataTypes.STRING,
    },
    ...
  }, {
    classMethods: {
      associate: function(models) {
        this.belongsTo(models.articleGroup);
      },
    },
  });
  
  ...
  
  sequelize.define('articleGroup', {
    GROUP_CODE: {
        type: DataTypes.STRING,
    },
    ...
  });
  </code></pre>
  
  <p>I'm working with legacy data where the connection between those two is made with the <code>GROUP_CODE</code> field. I've added a foreign key to the <code>article</code> model. The problem is when I try to update that foreign key. This is the code with which I'm trying to accomplish that:</p>
  
  <pre><code>let db = require('../models');
  
  db.articleGroup.findAll().then((groups) =&gt; {
    groups.forEach((group) =&gt; {
      db.article.update({groupArticleId: group.id}, {where: {GROUP_CODE: group.GROUP_CODE}});
    });
  });
  </code></pre>
  
  <p>With this code I get a bunch of:</p>
  
  <pre><code>...
  Executing (default): UPDATE `article` SET `updatedAt`='2017-08-05 12:43:02' WHERE `GROUP_CODE` = '6'
  Executing (default): UPDATE `article` SET `updatedAt`='2017-08-05 12:43:02' WHERE `GROUP_CODE` = '11'
  Executing (default): UPDATE `article` SET `updatedAt`='2017-08-05 12:43:02' WHERE `GROUP_CODE` = '1'
  ...
  </code></pre>
  
  <p>It's updating the <code>updatedAt</code> but not the <code>groupArticleId</code> field. How can I accomplish that?</p>