title: Adding a TastyPie ModelResource to another ModelResource connected by a Django OneToOne Relationship
body: <p>I have two django models that are connected by a OneToOne relationship and I am having trouble seeing how to connect them in a Tastypie ModelResource.</p>
  
  <p>Instead of posting some new models I will borrow the models defined in <a href="https://stackoverflow.com/questions/7815756/including-child-resources-in-a-django-tastypie-api">Including child resources in a Django Tastypie API</a> to show where I am not getting how to do this. Using the <code>Ticket</code> and <code>TicketComment</code> models, imagine that the <code>TicketComment</code> was like this:</p>
  
  <pre><code>class TicketComment(models.Model):
      ticket = models.OneToOneField('Ticket')
  </code></pre>
  
  <p>instead of using the ForeignKey field. I have seen the docs as well as posts like the above which are using the <code>ToManyField</code> and <code>ToOneField</code>. But that doesn't appear to work in my situation since the <code>Ticket</code> does not reference the <code>TicketComment</code>. What I want to do is be able to create an API that lists the <code>TicketComment</code> in the <code>Ticket</code>. Tastypie rightly throws an exception saying that <code>TicketComment</code> fields don't exist in the <code>Ticket</code> model. Is there a way to get the nice serialized <code>TicketComment</code> into the <code>Ticket</code> API?</p>