title: JPA find the Last entry
body: <p>I would like to know what's the best way to get the last entry of a table with JPA.
  In Sql, what I'm looking for would be like:</p>
  
  <pre><code>select id from table order by id desc limit 1 
  </code></pre>
  
  <p>I was thinking about model.count() but that sounds more like a hack than a good solution ;)</p>