title: Why does my Play Framework (1.2.4) count query fail?
body: <p>I have a simple model involving title and description.  It extends play.db.jpa.Model</p>
  
  <p>The following search method works perfectly</p>
  
  <pre><code>public static SearchResults search(String search, Integer page) {
      String likeSearch = "%" + search + "%";
      long count = find("title like ? OR description like ? order by " +
              "title ASC", likeSearch, likeSearch).fetch().size();
      List&lt;Must&gt; items = find("title like ? OR description like ? order by " +
              "title ASC", likeSearch, likeSearch).fetch(page, 20);
      return new SearchResults(items, count);
  }
  </code></pre>
  
  <p>However when I tweak count as follows</p>
  
  <pre><code>    long count = count("title like ? OR description like ? order by " +
              "title ASC", likeSearch, likeSearch);
  </code></pre>
  
  <p>I get</p>
  
  <blockquote>
    <p>PersistenceException occured :
    org.hibernate.exception.SQLGrammarException: could not execute query</p>
    
    <p>ERROR ~ ERROR: column "must0_.title" must appear in the GROUP BY
    clause or be used in an aggregate function</p>
  </blockquote>
  
  <p>Why is the error asking me to use an aggregate function when the query has not changed at all?</p>