title: Creating factories for Django models with OnetoOne relationships
body: <p>I'm trying to setup a number of factories for Django models which have a OneToOne relationship &amp; they don't seem to behave in the same way as foreign keys.</p>
  
  <p>When running my unittest the main model doesn't have it's relationships set.</p>
  
  <p>My models:</p>
  
  <pre><code>class ThePlan(models.Model):
      user = models.ForeignKey("User")
      creationdate = models.DateField(auto_now_add=True)
  
  
  class OldPlan(models.Model):
      plan = models.OneToOneField("ThePlan")
      theplan = CharField(max_length  = 200,)
  
  
  class NewPlan(models.Model):
      plan = models.OneToOneField("ThePlan")
      theplan = CharField(max_length  = 200,)
  </code></pre>
  
  <p>My factories:</p>
  
  <pre><code>class ThePlanFactory(factory.DjangoModelFactory):
      FACTORY_FOR = "mysite.PlanModel"
  
      user = factory.SubFactory(UserFactory)
  
  
  class OldPlanFactory(factory.DjangoModelFactory):
      FACTORY_FOR = "mysite.OldModel"
  
      plan = factory.RelatedFactory(ThePlanFactory)
      theplan = ''
  
  
  class NewPlanFactory(factory.DjangoModelFactory):
      FACTORY_FOR = "mysite.NewModel"
  
      plan = factory.RelatedFactory(ThePlanFactory)
      theplan = ''
  </code></pre>
  
  <p>And in my test <code>setUp()</code> I'm doing the following;</p>
  
  <pre><code>def setUp(self):
      self.user = factories.UserFactory.create()
  
      self.plan = factories.ThePlanFactory.create(
          user=self.user
      )
      self.oldplan = factories.OldPlanFactory.create(
          plan=self.plan
      )
      self.newplan = factories.NewPlanFactory.create(
          plan=self.plan
      )
  </code></pre>
  
  <p>So when I'm running a test with this included I'm getting <code>DoesNotExist: ThePlan has no OldPlan</code>.</p>
  
  <p>Where am I going wrong here? Is the problem that I'm calling <code>create</code> immediately and instead I should setup the factories with <code>build</code>, set the relationships, and then call <code>save</code>?</p>