Hi, I need a little help in using named queries..
I have defined a query in mapping file, outside the main class.
<sql-query name="DeleteQuery">
<![CData[Delete From testcust t Where t.Emp_ID = ?]]>
<return alias="t" class="testcust"/>
</sql-query>
and refer it in main class named : NHibernateEx.testcust
<class="NHibernateEx.testcust" namespace=blaa blaa/>
....
<loader query-ref = "DeleteQuery"/>
...
</class>
then i used that named query in my coding.
mySession.GetNamedQuery("DeleteQuery")
When compile, it gives an error: unknown class testcust
How to solve this error? Or what is the correct way to do this task?
Waiting for ur replies..
Regards.
Ovais
|