Hi, Really thanks for your reply and very good links.
But actually I checked everything but still not sure what's wrong I did.
Here is my .hbm file.
Code:
<?xml version="1.0" encoding="utf-8" ?>
<!-- Generated by MoreGen 28-Apr-2008 11:27:28 -->
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" >
<sql-query name="RulesDetails_Get" >
<return alias="RulesDetails_Get" class="ELADAO.RulesDetails_Get, ELADAO">
<return-property name="QtyAlreadyOrdered_Component" column="QtyAlreadyOrdered_Component"></return-property>
<return-property name="QtyAlreadyOrdered_Family" column="QtyAlreadyOrdered_Family"></return-property>
<return-property name="QtyAlreadyOrdered_Group" column="QtyAlreadyOrdered_Group"></return-property>
<return-property name="QtyAlreadyOrdered_SubGroup" column="QtyAlreadyOrdered_SubGroup"></return-property>
<return-property name="QtyAlreadyOrdered_ELA" column="QtyAlreadyOrdered_ELA"></return-property>
<return-property name="MaxQtyAllowed_Component" column="MaxQtyAllowed_Component"></return-property>
<return-property name="MaxQtyAllowed_Family" column="MaxQtyAllowed_Family"></return-property>
<return-property name="MaxQtyAllowed_Group" column="MaxQtyAllowed_Group"></return-property>
<return-property name="MaxQtyAllowed_SubGroup" column="MaxQtyAllowed_SubGroup"></return-property>
<return-property name="MaxQtyAllowed_ELA" column="MaxQtyAllowed_ELA"></return-property>
<return-property name="QtyBalanceAvailable_Component" column="QtyBalanceAvailable_Component"></return-property>
<return-property name="QtyBalanceAvailable_Family" column="QtyBalanceAvailable_Family"></return-property>
<return-property name="QtyBalanceAvailable_Group" column="QtyBalanceAvailable_Group"></return-property>
<return-property name="QtyBalanceAvailable_SubGroup" column="QtyBalanceAvailable_SubGroup"></return-property>
<return-property name="QtyBalanceAvailable_ELA" column="QtyBalanceAvailable_ELA"></return-property>
</return>
<!--
{ call RulesDetails_Get(?,:ELAID, ?,:FamilyID, ?,:GroupID, ?,:SubGroupID, ?,:ItemComponentID, ?,:ComponentID) }
-->
{ call RulesDetails_Get(:ELAID, :FamilyID, :GroupID, :SubGroupID, :ItemComponentID, :ComponentID) }
</sql-query>
</hibernate-mapping>
And I also have class file.
And Here is my code to call it.
Code:
NHibernate.ISession hibSession = null;
hibSession = getHibSession();
IQuery q = hibSession.GetNamedQuery("RulesDetails_Get");
q.SetParameter("ELAID", 7);
q.SetParameter("FamilyID", 28);
q.SetParameter("GroupID", 79);
q.SetParameter("SubGroupID", 219);
q.SetParameter("ItemComponentID", 584);
q.SetParameter("ComponentID", 563);
IList results = q.List();