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.
Showing posts with label storedprocedure stored procedure namedquery namequeries Hibernate JPA EJB3.0 Java Persistence API Java JEE EJB Hibenrate3 refcursor Oracle db2 Sybase jdbc varchar JavaRanch. Show all posts
Showing posts with label storedprocedure stored procedure namedquery namequeries Hibernate JPA EJB3.0 Java Persistence API Java JEE EJB Hibenrate3 refcursor Oracle db2 Sybase jdbc varchar JavaRanch. Show all posts
Wednesday, July 16, 2008
Subscribe to:
Posts (Atom)
