Hi All!
I cant seem to find info related to using named variables in stored procs.
Is it possible to somehow bind parameters by place not by position, like this:
Code:
<class name="Customer"
table="CUSTOMER"
where="DATE_TO IS NULL">
<id name="Id" type="System.Int64" column="CUSTOMER_ID">
<generator class="sequence">
<param name="sequence">CUSTOMER_ID_SEQ</param>
</generator>
</id>
<property name="CustomerTypeId" type="System.Int32" column="CUSTOMER_TYPE_ID"/>
<property name="DateFrom" type="System.DateTime" column="DATE_FROM"/>
<property name="INN" type="System.String" column="INN"/>
<property name="IsPrivate" type="System.Boolean" column="IS_PRIVATE"/>
<property name="Note" type="System.String" column="NOTE"/>
<property name="RegistrationAddressId" type="System.Int64" column="REG_ADDRESS_ID"/>
...
<sql-update>
call CUSTOMER_UPD.UPD_CUSTOMER
:p_customer_id,
:p_customer_type_id,
:date_from,
:p_inn,
:p_is_private,
:p_note,
:p_reg_address_id,
</sql-update>
NHibernate tells me that:
DEBUG NHibernate.SQL - call CUSTOMER_UPD.UPD_CUSTOMER
:p_customer_id,
:p_customer_type_id,
:date_from,
:p_inn,
:p_is_private,
:p_note,
:p_reg_address_id,; :p0 = '1', :p1 = '23.11.2004 15:05:06', :p2 = '123456789', :p3 = 'False', :p4 = '1234', :p5 = '102', :p6 = '53'
NHibernate.Util.ADOExceptionReporter - ORA-01036
Hibernate version: 1.2.0 b3
Name and version of the database you are using: Oracle 9i