This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
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

How to call a db function from hibernate

 
Viswanath Sriram
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can any one tell me how to call the database function from hibernate.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you can used what is called a Named QUery, where in an xml file you create the call to the stored procedure, you will include ? to allow you to pass in the parameters.

Here is one big caveat.

There can only be one out parameter and it must be the first parameter.

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