title: JPQL/HSQL update with a limit?
body: <p>I want to update a @Version like column as an application managed pessimistic lock. </p>
  
  <p>These are the steps I want to take:</p>
  
  <ol>
  <li>Get the next number of the sequence</li>
  <li>Select the first 50 records and update a @version like column with the number of the sequence.</li>
  <li>Now select back those 50 records matching that sequence.</li>
  </ol>
  
  <p>How can one write a JPQL or HSQL query which updates a column but limits itself to a fixed number of records?</p>