Here are some wise words of wisdom regarding stored procedures and Hibernate from Mark Spritzler from the JavaRanch:
In Hibernate there are some caveats to stored procedures.
1. Only one out parameter and it must be the first parameter
2. The out parameter must be a refcursor. No other types will work.
If you have to work with a stored procedure that returns a varchar, you can call session.getConnection() and work directly with the jdbc connection. Although in this case you can't use a named query.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment