Brett Meyer commented on Bug HHH-1168

As a point of comparison, I set up a test using OpenJPA. A combination of lock mode, limit, and order by results in the following 2 queries:

SELECT * FROM (SELECT t0.id, t0.description, t0.sequence, t0.x, t0.y FROM DataPoint t0 ORDER BY t0.id DESC) WHERE ROWNUM <= ?
SELECT t0.id FROM DataPoint t0 WHERE t0.id = ? FOR UPDATE

Note that there is no locking between the 2, then each result is locked. This doesn't seem optimal.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira