title: Django Query with Left and Inner Joins
body: <p>I have 3 django models which are connected like this: </p>
  
  <pre><code>class AppUser(models.Model):
       pass
  
  class UserDevice(models.Model):
       user = ForeignKey(AppUser, related_name='user_devices')
  
  class Token(models.Model):
       user_device = OneToOneField(UserDevice, related_name='auth_token')
  </code></pre>
  
  <p>I have a situation in which I need to perform a query which <strong>Left Joins</strong> AppUser with UserDevice and <strong>Inner Joins</strong> UserDevice with Token (because I only need UserDevices which have a Token in system).<br>
  But whatever I've written until now using django's <em>prefetch_related</em> and <em>Prefetch objects</em>, hasn't been useful. The problem is that the ORM uses either Left Outer join for both joins or Inner join for both of them.<br>
  Is it possible to achieve what I want using ORM or should I necessarily write raw SQL for this?      </p>