title: Fetch specific related models from a one-to-many relationship
body: <p>I have two models Contact and Address. Contact has a one to many relationship to Address. There's a column &quot;is_primary&quot; on Address to indicate the main address for each Contact.</p>
  <p>Now, I'd like to create a model manager to return a queryset with all Contact objects and the related Address object that has &quot;is_primary=True&quot;. <strong>The database should only be hit once.</strong></p>
  <p>The goal is to use the queryset in a template and have the primary address together with the contact information in one record.</p>
  <p>How can this be done?</p>
  <p>Here's are the simplified models:</p>
  <pre><code>class Contact(models.Model):
      id = models.UUIDField(primary_key=True)
  
  class Address(models.Model):
      id = models.UUIDField(primary_key=True)
      contact = models.ForeignKey(Contact, on_delete=models.PROTECT)
      is_primary = models.Boolean()
      first_name = models.CharField(max_length=50)
      ...
  </code></pre>