title: Unable to insert row with non-nullable foreign key in sequelize
body: <p>I have 3 tables.</p>
  
  <p>Emoji, EmojiPost, User.</p>
  
  <p>Useful information about schema is as follows:</p>
  
  <pre><code>EmojiPost.belongsTo(User, { foreignKey: 'user' });
  EmojiPost.belongsTo(Emoji, {foreignKey: 'emoji_type'});
  User.hasMany(EmojiPost, {foreignKey: 'user', onDelete: 'cascade'});
  </code></pre>
  
  <p>When i have defined association like this, I am able to do the following to insert a EmojiPost into the database:</p>
  
  <pre><code>var data = {
      // some fields
      user: 1,
      emoji_type: 1
  }
  
  EmojiPost.create(data);
  </code></pre>
  
  <p>this works perfectly. However, I want the foreign keys to be non-nullable, so I change the association definition as follows:</p>
  
  <pre><code>EmojiPost.belongsTo(User, { foreignKey: {field: 'user', allowNull: false} });
  EmojiPost.belongsTo(Emoji, {foreignKey: {field: 'emoji_type', allowNull: false}});
  User.hasMany(EmojiPost, {foreignKey: 'user', onDelete: 'cascade'});
  </code></pre>
  
  <p>And after that, even though data contains both emoji_type and user values, yet I receive non-null constraint violation for both of them.</p>
  
  <p>I also tried the following for insertion:</p>
  
  <pre><code>var emoji = await Emoji.findByPk(1);
  var user = await User.findByPk(1);
  var emoji_post = EmojiPost.build(data); // here data does not contain user and emoji_type
  emoji_post.setEmoji(emoji);
  emoji_post.setUser(user);
  emoji_post.save();
  </code></pre>
  
  <p>This throws the error that setEmoji and setUser functions are not defined. I have been stuck on this for the entire day, any help is really appreciated.</p>