title: How to set/create records in associations in Sequelize? (many to many relation)
body: <p>I'm trying to use the parent.addChild() method Sequelize provides, but for some reason it can't recongise that function and throws and error on me.</p>
  
  <p>I read a bunch of other questons here and they all mention that these methods are added to the model. I read the whole docs, re-read <a href="http://docs.sequelizejs.com/en/latest/api/associations/belongs-to-many/" rel="nofollow">the part</a> containing the information I need, but just I can't get this thing to run... I can't see what I'm doing wrong here, can you guys give me a hand?</p>
  
  <pre><code>// Models
  const Person = Conn.define('person', {
      firstName: {
          type: Sequelize.STRING,
          allowNull: false
      },
      lastName: {
          type: Sequelize.STRING,
          allowNull: false
      }
  });
  
  const Post = Conn.define('post', {
      title: {
          type: Sequelize.STRING,
          allowNull: false
      },
      content: {
          type: Sequelize.STRING,
          allowNull: false        
      }
  });
  
  // Relationships 
  Person.belongsToMany(Post, {
      as: 'person',
      through: 'people_posts',
      foreignKey: 'person_id'
  });
  Post.belongsToMany(Person, {
      as: 'post',
      through: 'people_posts', 
      foreignKey: 'post_id'
  });
  
  
  Conn.sync({ force: true }).then(() =&gt; {
  
      const firstName = Faker.name.firstName();
      const lastName = Faker.name.lastName();
  
      return Person.create({
          firstName: firstName,
          lastName: lastName
      })
      .then(() =&gt; {
          return Post.create({
              title: `Title by ${firstName}`,
              content: 'Content' 
          });         
      }).then(() =&gt; {
          const person = Person.findOne({ where: { firstName: firstName }});
          const post = Post.findOne({ where: { content: "Content" }})
  
          return post.addPerson(person);
          // this gives me: Unhandled rejection TypeError: post.addPerson is not a function
      });
  });
  </code></pre>