title: Foreign key populated with an object
body: <p>I would like to make a relation between two models User and Task using backbone-relational.   </p>
  
  <p>The relation between the two models is the following:</p>
  
  <pre><code>taskModel.creator_id = userModel.id   
  </code></pre>
  
  <hr>
  
  <pre><code>// TaskModel
  var TaskModel = Backbone.RelationalModel.extend({
  
      relations: [
          {
              type: Backbone.HasOne,
              key: 'creator',
              keySource: 'creator_id',
              relatedModel: Users
          }
      ],
  
      // some code
  });
  </code></pre>
  
  <hr>
  
  <pre><code>// Task collection
  var TaskCollection = Backbone.Collection.extend({
  
      model: TaskModel,
  
      // some code
  
  });
  </code></pre>
  
  <hr>
  
  <pre><code>// User Model
  var User = Backbone.RelationalModel.extend({
      // some code
  });
  </code></pre>
  
  <hr>
  
  <p><strong>Actually the problem is in the collection.models, please see the attached images</strong>:</p>
  
  <p>Please check this jsfiddle: <a href="http://jsfiddle.net/2bsE9/5/" rel="nofollow noreferrer">http://jsfiddle.net/2bsE9/5/</a> </p>
  
  <pre><code>var user = new User(),
      task = new Task(),
      tasks = new Tasks();
  
  task.fetch();
  user.fetch();
  tasks.fetch();
  
  console.log(user.attributes, task.attributes, tasks.models);
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/4BFhI.png" alt="enter image description here"></p>
  
  <p>P.S.:</p>
  
  <p>Actually I am using requireJs to get the <code>UserModel</code>, so I cannot include quotes in relatedModel value.</p>
  
  <pre><code>define([
      'models/user',
      'backbone',
      'relationalModel'
  ], function (User) {
      "use strict";
  
      var Task = Backbone.RelationalModel.extend({
          relations: [
              {
                  type: Backbone.HasOne,
                  key: 'creator',
                  keySource: 'creator_id',
                  relatedModel: User
              }
          ],
      });
  );
  </code></pre>