title: Factory Boy subfactory over 'self'
body: <p>Does anyone know how to create the factory in factoryboy based on this models.py</p>
  
  <pre><code>class Halte(models.Model):
  
      koppel_halte1 = models.ForeignKey('self',
                                    related_name='koppel_halteA',
                                    verbose_name="Koppel Halte",
                                    help_text="geef hier een gekoppelde halte aan",
                                    null=True, blank=True)
  
      koppel_halte2 = models.ForeignKey('self',
                                    related_name='koppel_halteB',
                                    verbose_name="Koppel Halte",
                                    help_text="geef hier een gekoppelde halte aan",
                                    null=True, blank=True)
  </code></pre>
  
  <p>Notice the 'self'? (And YES this type of relation is necesarry.) </p>
  
  <p>I have tried several things in FactoryBoy (SubFactory, RelatedFactory, SelfAtribute, PostGeneration) but I can't get it to work.</p>
  
  <p>one of the attempts in a factories.py</p>
  
  <pre><code>class HalteFactoryA(factory.DjangoModelFactory):
      class Meta:
          model = models.Halte
  
  
  class HalteFactoryB(factory.DjangoModelFactory):
      class Meta:
          model = models.Halte
  
  
  class HalteFactory(factory.DjangoModelFactory):
      class Meta:
          model = models.Halte
      # todo: how to do this?? (see models.Halte)
      koppel_halte1 = factory.RelatedFactory(HalteFactoryA)
      koppel_halte2 = factory.RelatedFactory(HalteFactoryB)
  </code></pre>
  
  <p>Any advice?</p>
  
  <p>Thank you.</p>