ORA-00904: "THIS_"."ID" when combining SetMaxResults and SetLockMode in single query

Description

I have a simple table (let's call it MyTable) which I query as follows:

This fails on Oracle with following exception:

Generated SQL is (I obfuscated the query by removing the columsn which are not important for the example here):

I think this problem might be somehow related to / NH-1023, but defintelly can be observed in NH 4.0.4.

Environment

Oracle

Assignee

Unassigned

Reporter

WłodzisławF

Labels

None

Components

Affects versions

Priority

Major
Configure