Help: How to call oracle function?

16 views
Skip to first unread message

Hakan karaoğlu

unread,
Nov 9, 2020, 7:26:38 AM11/9/20
to nhusers
Hi,

How to call oracle function? I tried code below but not working. By the way, I am using code-first for domain mapping.

mapping.hm.xml

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" auto-import="true">

  <sql-query name="GETFEEDTAGFLAGS">
    <return class="string, our.assembly"  />
    { ? = call IZCI.GET_FEED_TAGFLAGS(?,?,?) }
  </sql-query>

</hibernate-mapping>

My query,

 IQuery namedQuery = _session.GetNamedQuery("GETFEEDTAGFLAGS");
namedQuery.SetParameter("wsid", 135);
namedQuery.SetParameter("sid", 1);
namedQuery.SetParameter("did", 302600659);
var tresult = namedQuery.UniqueResult<string>();

Error: NHibernate.MappingException: 'Named query not known: GETFEEDTAGFLAGS'

B.R.

Reply all
Reply to author
Forward
0 new messages