title: Django multiple column join
body: <p>I have two Django models.
  <br><br>One that stores activities:</p>
  
  <pre><code>Activity:
      -title #Exampe: sky diving
      -category
      -etc...
  </code></pre>
  
  <p><br>
  And one that stores the interaction of a user with that activity (eg: if someone did it). A record is only inserted when there a user interaction has occurred.</p>
  
  <pre><code>UserActivity:
      -user (Foreign key to user model) #Exampe: sky diving
      -activity (Foreign key to Activity model)
      -is_completed (boolean)
  </code></pre>
  
  <p><br>
  Now I want to select all Activities, except the ones that the current user has already completed :</p>
  
  <pre><code>activities = Activity.objects.exclude(
      UserActivity__user=user,
      UserActivity__is_completed=True
  )
  </code></pre>
  
  <p><br> Now, this is not working out as expected. Django does a join based on only Activity ID and:<br>
  <code>LEFT OUTER JOIN "achievements_activity_rating" ON ("achievements_base_activity"."id" = "achievements_activity_rating"."activity_id")</code>
  <br><br>
  If other users have a UserActivity record for the same Activity, this will make the same activity show up several times in the output as duplicates. I think I want Django to do something like this:
  <br>
  <code>LEFT OUTER JOIN "achievements_activity_rating" ON (
  "achievements_base_activity"."id" = "achievements_activity_rating"."activity_id" AND "achievements_activity_rating"."user" = "username_of_current_user")</code>
  <br></p>
  
  <p>Can I solve this problem with the Django ORM? I think my models are not a strange pattern, so I would expect a good generic solution for this.</p>