• 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: 17309
11
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!