title: Error while executing query
body: <p>I get an error message on this query</p>
  
  <pre><code>query = "select count(*) from pgns_game where raw_moves = %s"
  params = ('a',)
  total_rows = self.model.objects.raw(query, params)
  </code></pre>
  
  <p>and it says</p>
  
  <pre><code>InvalidQuery('Raw query must include the primary key')
  </code></pre>
  
  <p>I am clearly missing something but I don't know what. Any ideas?</p>