I am having problems getting stored procedures to work in NHibernate. I have the following mapping file;
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-lazy="false" >
<sql-query name="mySqlQuery" >
<return alias="s" class="storedProc.Supplier, storedProc">
<return-property name="Identifier" column="Supplier" />
<return-property name="Description" column="Description" />
</return>
select s.supplier,s.description from supplier
</sql-query>
<class name="storedProc.Supplier, storedProc" table="Supplier">
<id name="Identifier" column="Supplier">
<generator class="assigned"/>
</id>
<property name="Description" column="Description" type="String" length="30"></property>
<loader query-ref="mySqlQuery"/>
</class>
</hibernate-mapping
this doesn't work. can someone help?
|