title: Filtering a model in Django based on a condition upon the latest child record
body: <p>I have two models like this:</p>
  
  <pre><code>class Store(models.Model):
      name = models.CharField(max_length=255)
  
  class Order(models.Model):
      store = models.ForeignKey(Store)
      date = models.DateTimeField(auto_now_add=True)
      success = models.BooleanField()
  </code></pre>
  
  <p>I would like to filter all the records from the <code>Store</code> model whose latest order was successful i.e. <code>success == True</code>.</p>
  
  <p>Although it looks very simple, I'm having issues figuring how I would accomplish this using the ORM query system.</p>
  
  <p>Any help? Thanks.</p>