Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Oracle Procedure call in Hibernate

 
paresh doshi
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to call the Oracle procedure using java spring and Hibernate. Could you please provide the sample code, for calling the procedure using Hibernate.

Regards,
Paras.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://docs.jboss.org/hibernate/stable/core/reference/en/html/querysql.html#sp_query

for xml and you can use "callable" in NamedQueries with Annotations.

http://docs.jboss.org/hibernate/stable/annotations/reference/en/html_single/#entity-hibspec-query

Big thing is to note the restrictions, you can only have one out parameter and it must be a ref cursor.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic