title: SQl Query to Hibernate Query
body: <p>I have a MySQL query that I use to retrieve random rows from a table. The query is:</p>
  
  <pre><code>SELECT * FROM QUESTION WHERE TESTID=1 ORDER BY RAND() LIMIT 10;
  </code></pre>
  
  <p>Now I need to change this query to <strong><em>Hibernate</em></strong>. Did a bit of googling but couldn't find the answer. Can someone provide help on this?</p>