Stored Procedure
Hi,
Could anybody tell me how to map a stored procedure that inserts.
I found out how to map a stored procedure that selects in a hbm.xml file, but i can't get my insert stored procedure to work with the same mapping method.
My select stored procedure mapping:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<sql-query name="stp_Get_Something">
<return alias="Something" class="Namespace.ClassSomething, MyAssembly">
<return-property name="Id" column="Id"></return-property>
<return-property name="Info" column="Info"></return-property>
</return>
call stp_Get_Something(:parameters)
</sql-query> </hibernate-mapping>
thanks,
Andy
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Paul Batum on 01 Mar, 2010 09:27 AM
The way I did this is to use SqlInsert to call the stored procedure. I don't have the code in front of me but it was something like:
James Gregory closed this discussion on 18 Mar, 2010 12:17 PM.