Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About Hibernate Support for StoredProcedure

 
krishna bulusu
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
We are using Hibernate in our Project.
For calling Stored Procedure We are doing in the normal way like executing the Callable Statement.
I found that Hibernate 3 will support the Stored Procedures too.
Now, My question is which is the better option whether calling the stored procedures through Hibernate or Callable Statement?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can call Stored Procedures through Hibernate. There are two caveats.

1. You can have only one out parameter and it must be the first parameter.
2. That out parameter should be a ref cursor, not custom datatypes allowed.

Mark
 
krishna bulusu
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mark,

But, Which is Advantageous(Or In terms of Performance), calling through plain JDBC or calling through Hibernate?
And also, My Stored Procedure is returning a CLOB object. So, in such case, can I call the Stored Procedure through Hibernate?
[ July 27, 2007: Message edited by: krishna bulusu ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic