Nhibernate Generat wrong SQL for Oracle with locking -


yesterday i've been trying make code work inspite fact it's working fine nhibrnate , sql server when come oracle generate wrong sql

unitofwork.current.createcriteria<bill>().add(restrictions.isempty("reqid")) .setmaxresults(batchsize).setlockmode(lockmode.upgrade).list<bill>(); 

the generated sql

select *  (select bill_0.id,bill_0.billno ...... bill bill_0 bill_0.reqid not null ) rownum < 10 update of bill_0.id 

so wont run because allies bill_o defined inside inner sql statement got solution ?

the correct sql tried , worked on oracle db

select bill_0.id,bill_0.billno ...... bill bill_0  bill_0.reqid not null , rownum < 10 update of bill_0.id 

since, say, nhibernate generating invalid oracle sql, suggest file bug nhibernate people. sql work if in-line view had been assigned alias of "bill_0", or if update clause didn't use table alias ("for update of id"). whether can modify nhibernate calls make either of these happen i'm afraid have no idea.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -