wood burning stoves
The moose likes Object Relational Mapping and the fly likes About Hibernate Support for StoredProcedure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "About Hibernate Support for StoredProcedure" Watch "About Hibernate Support for StoredProcedure" New topic

About Hibernate Support for StoredProcedure

krishna bulusu
Ranch Hand

Joined: Aug 28, 2006
Posts: 185
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?

Thanks&Regards, Krishna.
SCJP1.4, SCWCD1.4, SCBCD 5.0
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

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.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
krishna bulusu
Ranch Hand

Joined: Aug 28, 2006
Posts: 185
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 ]
I agree. Here's the link: http://aspose.com/file-tools
subject: About Hibernate Support for StoredProcedure
It's not a secret anymore!