Re: JPA Calling an Oracle function with OUT parameter



Thu, 12 Jun 2008 09:54:34 -0500, /Jason King/:
Owen Jacobson wrote:

If there's any support for it at all, it'll be a JPA-vendor-specific feature. The JPA provider for JBoss 4 is Hibernate; as far as I'm aware, there's no general purpose support for stored procedure calls, only some special-case support for a few specific forms. Check the hibernate docs for details:
<http://www.hibernate.org/hib_docs/reference/en/html/querysql.html#sp_query>

16.2.2.1 has some specific notes for Oracle sprocs.

If you can rewrite the pl/sql side as a function that might get you out of hell.

Thank you both Owen and Jason for your suggestions. I've followed the Hibernate documentation and obtained a JDBC connection through |session.connection()| preparing a CallableStatement which works, but I'll most probably write an additional PL/SQL function (I can't modify the existing one) to "normalize" the result, later.

--
Stanimir
.