title: Django queryset exclude empty foreign key set
body: <p>I have the following models where B has a many-to-one relationship with A:</p>
  
  <pre><code>class A(model.Model):
  
      name = models.IntegerField()
  
  class B(models.Model
  
      a = models.ForeignKey(A, db_column='a_id')
  </code></pre>
  
  <p>When I use a queryset on A, is there a way to exclude the rows in A that have no rows in B?</p>