title: Annotating a Django queryset with a left outer join?
body: <p>Say I have a model:</p>
  
  <pre><code>class Foo(models.Model):
      ...
  </code></pre>
  
  <p>and another model that basically gives per-user information about <code>Foo</code>:</p>
  
  <pre><code>class UserFoo(models.Model):
      user = models.ForeignKey(User)
      foo = models.ForeignKey(Foo)
      ...
  
      class Meta:
          unique_together = ("user", "foo")
  </code></pre>
  
  <p>I'd like to generate a queryset of <code>Foo</code>s but annotated with the (optional) related <code>UserFoo</code> based on <code>user=request.user</code>.</p>
  
  <p>So it's effectively a <code>LEFT OUTER JOIN on (foo.id = userfoo.foo_id AND userfoo.user_id = ...)</code></p>