I execute it according to the documentation:

I got this exception:
could not execute query
[ exec GetEmittedDocsProc ]
[SQL: exec GetEmittedDocsProc]

{"ORA-00900: sentencia SQL no válida"}

Any ideas?

On 21 nov, 19:03, Diego Mijelshon <[email protected]> wrote:
> For entity-returning SPs, the limitations are listed 
> here:http://nhforge.org/doc/nh/en/index.html#querysql-limits-storedprocedures
>
>     Diego
>
> On Sun, Nov 21, 2010 at 17:52, fedehf <[email protected]> wrote:
> > Hello. I've been having serious problems trying to execute a Store
> > Procedure or a Function through nhibernate. What I need is to map a
> > function o SP  that returns a cursor to an entity. I created a named
> > query like this:
>
> > <?xml version="1.0" encoding="utf-8" ?>
> > <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-
> > access="property" auto-import="true" default-cascade="none" default-
> > lazy="true">
> >  <class xmlns="urn:nhibernate-mapping-2.2"  mutable="false"
> > name="AgencyDocument" table="AgencyDocuments">
> >    <id name="Id" type="System.Int64, mscorlib, Version=4.0.0.0,
> > Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
> >    <property name="DocumentNumber" type="System.String, mscorlib,
> > Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
> >      <column name="DOC" length="255" not-null="true" />
> >    </property>
>
> >  </class>
>
> >  <sql-query name="GetEmittedDocs" callable="true">
> >    <return class=AgencyDocument">
> >      <return-property name="DocumentNumber" column="DOC"/>
> >    </return>
> > { ? = call GetEmittedDocs(17795,11,1,1) }
> >  </sql-query>
> > </hibernate-mapping>
>
> > The function returns a rowset with column DOC.
> > I try to execute it like tihs:
> >            var query = this.Session.GetNamedQuery("GetEmittedDocs");
> >            query.List<AgencyDocument>();
>
> > When trying to execute the function I get the following error:
> > could not execute query
> >       [ { :p0 = call GetEmittedDocs(17795,11,1,1) } ]
> >       [SQL: { :p0 = call GetEmittedDocs(17795,11,1,1) }]
>
> > The type of error is ORA-0911. Invalid character.
>
> > How can I map a SP or Function that returns a cursor to an entity.
> > I'm using Oracle 10g and Nhibernate 2.1.0.4000.
>
> > Thanks in advance
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "nhusers" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<nhusers%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/nhusers?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to