title: Q objects and the '&' operator in django
body: <p>I have a curious problem.</p>
  
  <p>I have 3 objects. All the same</p>
  
  <pre><code>class Articles(models.Model):
      owner = models.ForeignKey(Author)
      tags = models.ManyToManyField('Tag')
  
  
  class Tag(models.Model):
       name = models.CharField(max_length=255)
  </code></pre>
  
  <p>and so I have 3 Articles. With all the same tags: 'tag1' and 'tag2'</p>
  
  <p>And I have queries</p>
  
  <pre><code>actionsAll = Articles.objects.filter((Q(tags__name__exact="tag1") | Q(tags__name__exact="tag2"))).distinct()
  </code></pre>
  
  <p>This gives me all my articles. It will return 6 articles w/o distinct() since it will collect each article 2x since they have both tags.</p>
  
  <p>However with this query:</p>
  
  <pre><code>actionsAll = Articles.objects.filter((Q(tags__name__exact="tag1") &amp; Q(tags__name__exact="tag2"))).distinct()
  </code></pre>
  
  <p>This gives me no articles. 
  Since the articles contain both the tags, it should return them all shouldnt it?</p>