Minor
git-svn-id: https://svn.jboss.org/repos/hibernate/trunk/Hibernate3/doc@6264 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
ae57e31a9f
commit
b5632686ae
|
@ -237,19 +237,15 @@ BEGIN
|
||||||
are not supported.
|
are not supported.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
|
||||||
TODO: make the "rules" visually nicer and understandable ,)
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<sect3 id="querysql-limits-storedprocedures">
|
<sect3 id="querysql-limits-storedprocedures">
|
||||||
<title>Rules/Limitations for using stored procedures</title>
|
<title>Rules/limitations for using stored procedures</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To use stored procedures with Hibernate the procedures have to follow some rules.
|
To use stored procedures with Hibernate the procedures have to follow some rules.
|
||||||
If they do not follow those rules they are not usable with Hibernate. If you still
|
If they do not follow those rules they are not usable with Hibernate. If you still
|
||||||
want to use these procedures you have to execute them via <literal>session.connection()</literal>.
|
want to use these procedures you have to execute them via <literal>session.connection()</literal>.
|
||||||
The rules are different per database since database vendors have different stored procedure
|
The rules are different for each database, since database vendors have different stored
|
||||||
semantics/syntax.
|
procedure semantics/syntax.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
@ -259,13 +255,13 @@ BEGIN
|
||||||
<itemizedlist spacing="compact">
|
<itemizedlist spacing="compact">
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
It must return a result set. This is done by returning a SYS_REFCURSOR in Oracle 9 or 10.
|
The procedure must return a result set. This is done by returning a SYS_REFCURSOR in Oracle 9
|
||||||
In Oracle you need to define a REF CURSOR type.
|
or 10. In Oracle you need to define a <literal>REF CURSOR</literal> type.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
It should be on the form <literal>{ ? = call procName(<parameters>) }</literal> or
|
Recommended form is <literal>{ ? = call procName(<parameters>) }</literal> or
|
||||||
<literal>{ ? = call procName }</literal> (This is more an Oracle rule than a Hibernate rule.)
|
<literal>{ ? = call procName }</literal> (This is more an Oracle rule than a Hibernate rule.)
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
@ -278,15 +274,15 @@ BEGIN
|
||||||
<itemizedlist spacing="compact">
|
<itemizedlist spacing="compact">
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
It must return a result set. Note that since these servers can/will return multiple result
|
The procedure must return a result set. Note that since these servers can/will return multiple
|
||||||
sets and update count Hibernate will iterate the results and take the first result that is
|
result sets and update counts, Hibernate will iterate the results and take the first result that
|
||||||
a result set as its return value. Everything else will be discarded.
|
is a result set as its return value. Everything else will be discarded.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
If you can enable SET NOCOUNT ON in your procedure it will probably be the most efficient, but
|
If you can enable <literal>SET NOCOUNT ON</literal> in your procedure it will probably be
|
||||||
it is not a requirement.
|
more efficient, but this is not a requirement.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
Loading…
Reference in New Issue