I’ve written a stored procedure with the following sql statements
- insert a row in table a
- update a row in table b
- insert a row in error table
- select query to list the number of records in the error table
Can i use query.list() ? Will it does all the inserts, updates and returns the list properly?
I think we cannot use query.executeUpdate() as it returns only number of rows updated or inserted at last sql statement.
Thanks in advance,
Kathir
http://www.mkyong.com/hibernate/how-to-call-store-procedure-in-hibernate/
See above link for sample of how to call stored procedures with hibernate
if you are using spring, you can call stored procedures via Spring JdbcTemplate as well.