Open
Description
bimcio created an issue — 24th August 2016, 9:43:37:
I have a simple table (let's call it MyTable) which I query as follows:
ICriteria query = session.CreateCriteria(typeof(MyTable)) .SetMaxResults(1) .SetLockMode(LockMode.Upgrade); var list = query.List<MyTable>();This fails on Oracle with following exception:
DataAccess.Client.OracleException ORA-00904: "THIS_"."ID": invalid identifier
Generated SQL is (I obfuscated the query by removing the columsn which are not important for the example here):
select Id132_0_, /* more columns here */ KeyId132_0_ from ( SELECT this_.Id as Id132_0_, /* more columns here */ this_.KeyId as KeyId132_0_ FROM MyTable this_ ) where rownum <=:p0 for update of this_.Id; :p0 = 1 <Type: Int32 (0)>I think this problem might be somehow related to NH-111 / NH-1023, but defintelly can be observed in NH 4.0.4.