Is it possible to limit the number of rows that are updated using Hibernate/HQL? For instance:
Query q = em.createQuery(\"UPDATE MyObj o Set o.prop = :prop\");
Try HSQLDB 2.0 (the latest snapshot jars, not the GA) with Hibernate 3.5.5
It does require an inner select with LIMIT at the end but this no longer requires an ORDER BY. Also, ORDER BY can use an index if it is the same index as the one used for SELECT.
An example would be like:
UPDATE MyObj o SET o.prop = :prop WHERE o.id IN (SELECT id FROM MyObj LIMIT 10)