title: Sequelize returning `null` object for hasOne association's linked model after bulk inserting pre-existed data
body: <p>I have a pre-existing data in the form of JSON files which I am trying to insert into Sequelize SQLite table. I have 2 tables: <code>Master_Vessel</code> and <code>Requests</code>. There is a <code>Request.hasOne(Vessel)</code> association, meaning that every <code>request</code> has a <code>vessel</code> associated with it. </p>
  
  <p>The key connecting both the models is <code>vessel.Vessel_Name</code>, which is a string. The data has been generated from a system which validates the keys so it is consistent (every <code>request.Vessel_Name</code> exists in <code>vessel.Vessel_Name</code>, <code>vessel.Vessel_Name</code> is unique).</p>
  
  <p>I want to load this data into Sequelize managed table. I am creating the models as follows: </p>
  
  <pre><code>var Request = sequelize.define('request', {
       // other fields
       Vessel_Name: {
          type: Sequelize.STRING
       }
  }, {
      tableName: 'Request'
  });
  
  var Vessel = sequelize.define('vessel', {
       // other fields
       Vessel_Name: {
          type: Sequelize.STRING,
          primaryKey: true
       }
  }, {
      tableName: 'Master_Vessel'
  });
  </code></pre>
  
  <p>And, the association is as follows: </p>
  
  <pre><code>Request.hasOne(Vessel, {foreignKey: 'Vessel_Name', allowNull: true});
  </code></pre>
  
  <p>Now, I am loading the data in following steps:</p>
  
  <ol>
  <li>Create and bulk load the <code>Vessel</code> model</li>
  <li>Create the <code>Request</code> model, the association and bulk load the <code>Request</code> model</li>
  </ol>
  
  <p>Everything runs fine without any issues. However when I try to query using the association as follows:</p>
  
  <pre><code>Request.findOne()
  .then(request =&gt; {
      console.log(request.get())
      request.getVessel()
      .then(vessel =&gt; console.log(vessel))
  });
  </code></pre>
  
  <p><code>request</code> instance contains the <code>Vessel_Name</code> foreign key, however the <code>vessel</code> instance is <code>null</code>.</p>
  
  <p>Can anybody please help?</p>