title: Sequelize Many-to-Many add function doesn't work
body: <p><strong>package.json</strong></p>
  
  <blockquote>
    <p>"express": "^4.17.1",
    "pg": "^7.17.1",
    "pg-hstore": "^2.3.3",
    "sequelize": "^5.21.3",</p>
  </blockquote>
  
  <p><strong>There're two models:</strong></p>
  
  <pre><code>// User
  const User = seq.define('user', {
    id: {
      type: Sequelize.INTEGER,
      autoIncrement: true,
      primaryKey: true,
      allowNull: false
    },
    login: {
      type: Sequelize.STRING,
      allowNull: false
    },
    password: {
      type: Sequelize.STRING,
      allowNull: false
    },
    age: {
      type: Sequelize.INTEGER
    },
    isDeselected: {
      type: Sequelize.BOOLEAN
    }
  }, { timestamps: false });
  
  export default User;
  
  // Group
  const Group = seq.define('group', {
    id: {
      type: Sequelize.INTEGER,
      autoIncrement: true,
      primaryKey: true
    },
    name: {
      type: Sequelize.STRING,
      allowNull: false
    },
    permissions: {
      type: Sequelize.ARRAY
    }
  }, { timestamps: false });
  
  export default Group;
  </code></pre>
  
  <p><strong>There's group for association:</strong></p>
  
  <pre><code>import Group from './group';
  import User from './user';
  
  const UserGroup = seq.define('UserGroup');
  
  Group.belongsToMany(User, { through: UserGroup });
  User.belongsToMany(Group, { through: UserGroup });
  
  seq.sync({ force:true }).then(() =&gt; { console.log("Tables have been created"); }).catch(err=&gt;console.log(err));
  </code></pre>
  
  <p><strong>And method for adding user to group:</strong></p>
  
  <pre><code>UserModel.findOne({ where: { id: userIds } })
        .then((user) =&gt; {
          if (!user) { return; }
          GroupModel.findOne({ where: { id: groupId } })
            .then((group) =&gt; {
              if (!group) return;
              user.addGroup(group);
            });
  </code></pre>
  
  <p><strong>There's an error during executing:</strong></p>
  
  <blockquote>
    <p>Unhandled rejection TypeError: user.addGroup is not a function</p>
  </blockquote>