Here's a few more w/ scalars and another attempt at LockModeType.PESSIMISTIC_READ. For each, OpenJPA simply states "The database is unable to lock this query.". "For update" is left out entirely.
SELECT * FROM (SELECT UPPER(t0.description), t0.id FROM DataPoint t0 ORDER BY t0.id DESC) WHERE ROWNUM <= ?
SELECT MAX(t0.id) FROM DataPoint t0
SELECT DISTINCT UPPER(t0.description) FROM DataPoint t0
Here's a few more w/ scalars and another attempt at LockModeType.PESSIMISTIC_READ. For each, OpenJPA simply states "The database is unable to lock this query.". "For update" is left out entirely.
SELECT * FROM (SELECT UPPER(t0.description), t0.id FROM DataPoint t0 ORDER BY t0.id DESC) WHERE ROWNUM <= ?
SELECT MAX(t0.id) FROM DataPoint t0
SELECT DISTINCT UPPER(t0.description) FROM DataPoint t0