title: Hibernate, HSQL, and Update w/ Limits
body: <p>Is it possible to limit the number of rows that are updated using Hibernate/HQL?  For instance:</p>
  
  <pre><code>Query q = em.createQuery("UPDATE MyObj o Set o.prop = :prop");
  q.setParameter("prop", "foo");
  q.setMaxResults(myLimit);
  
  int res = q.executeUpdate();
  if (res &gt; myLimit) {
      // This is entering here and I don't want it to!
  }
  </code></pre>
  
  <p>I've been Googling around and such, and I am trying to use HQL so that I can do some unit tests using HSQL DB in memory dbs, as well as using MySql in deployment. MySql supports the Limit clause on Update statements, but HSQL does not, and doing an UPDATE with an inner select in HSQL required an order by, which seemed like a bad idea. Is there a way for me to achieve limiting the number of rows in an update?</p>
  
  <p>Thanks.</p>