title: sequelize : Create new entry with existing foreign key
body: <p>I create 2 models : </p>
  
  <pre><code>userPreferenceCategories = sequelize.define("userPreferenceCategories", {
      id : {
          type          : Sequelize.INTEGER,
          autoIncrement : true,
          primaryKey    : true,
          allowNull     : false
      },
      name : {
          type      : Sequelize.STRING,
          allowNull : false
      }
  }, {
      indexes: [
          {
              unique : true,
              fields : ["name"]
          }
      ],
      freezeTableName : true
  });
  </code></pre>
  
  <p>and </p>
  
  <pre><code>userPreferenceCategoryTypes =  sequelize.define("userPreferenceCategoryTypes", {
      id : {
          type          : Sequelize.INTEGER,
          autoIncrement : true,
          primaryKey    : true,
          allowNull     : false
      },
      name : {
          type      : Sequelize.STRING,
          allowNull : false
      }
  }, {
      indexes: [
          {
              unique : true,
              fields : ["name", "userPreferenceCategoryId"]
          }
      ],
      freezeTableName : true
  });
  </code></pre>
  
  <p>With relation :</p>
  
  <pre><code>userPreferenceCategoryTypes.belongsTo(userPreferenceCategories, {
      onDelete   : "cascade",
      onUpdate   : "cascade",
      foreignKey : {
          field     : "userPreferenceCategoryId",
          allowNull : false,
      }
  });
  </code></pre>
  
  <p>one time, I create an userPreferenceCategories entry :</p>
  
  <pre><code>userPreferenceCategories.upsert({name : "cat1"});
  </code></pre>
  
  <p>in second time, I would like create an userPreferenceCategoryTypes associate at "cat1" like this : </p>
  
  <pre><code>userPreferenceCategoryTypes.upsert({
      name : "type1",
      userPreferenceCategory : {
          name : "cat1"
      }
  }, {
      include: [ {
          model : userPreferenceCategories
      } ]
  }); 
  </code></pre>
  
  <p>but this don't work with message : </p>
  
  <pre><code>Unhandled rejection SequelizeValidationError: notNull Violation: userPreferenceCategoryId cannot be null
  </code></pre>
  
  <p>In fact, sequelize does not seem to add userPreferenceCategoyId attribut on sql request. How can I insert new entry in userPreferenceCategoryTypes this foreignKey of cat ? I don't execute that on series.</p>
  
  <p>EDIT 1 :</p>
  
  <p>I found a solution but I'm not sure if there had better : /</p>
  
  <pre><code>userPreferenceCategory.find({where: {name: "cat1"}}).then(function (cat) {
      UserPreferenceCategoryType.create({
          name : "type1",
          userPreferenceCategoryId : cat.getDataValue("id")
      });
  });
  </code></pre>