Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling stored procedures from hibernate

 
Raj Kumar Bindal
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we call any type of stored procedure from hibernate(e.g. calling stored procedure returning multiple values etc)?

Is it something that only stored procedures returning sys_refcursor can be called from hibernate?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So long as a stored procedure returns a result set as the first out parameter you can call it from Hibernate. See the documentationfor an example.

One thing worth thinking about is why you might want to call a stored procedure from Hibernate. Unless it is because you have no choice its not something I'd choose to do.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic