hi,
I'm trying to return a cursor from a Oracle SP using nhibernate.The following is what the document says to achieve this...
For Oracle the following rules apply:
A function must return a result set. The first parameter of a procedure must be an OUT that returns a result set. This is done by using a SYS_REFCURSOR type in Oracle 9 or 10. In Oracle you need to define a REF CURSOR type, see Oracle literature.
I've created a SP which only returns a cursor using OUT Parameter.This is my nHibernate Configuration...
<sql-query name="GETPatient">
<return class="NHibernatePOB.Patient" >
<return-property name="PatientID" column="Patient_ID" ></return-property>
<return-property name="PatientDesc" column="Patient_DESC"></return-property>
<return-property name="PatientDate" column="STARTDATE"></return-property>
</return>
:ReturnValue = exec getPatient()
</sql-query>
But this doesnt works.Is this mapping correct?Please help to resolve this and let us know whether OUT parameters are supported.
Thanks,
Suresh.
|