Question: How do I invoke stored procedures/functions using Hibernate?


It’s possible, but not quite easy.

If you’re using Spring framework in your project, I’d strongly recommend that you have a look at Spring JDBC and consider it in place of Hibernate atleast for this specific scenario. You’ve got wonderful support there for stored procedures/functions.

Well, if you still insist on going ahead with Hibernate/you don’t want to add more complications to your project by going for Spring framework – a rare case, you can have a look at this piece of documentation which I’ve found to be very useful – http://docs.jboss.org/hibernate/core/3.3/reference/en/html/querysql.html#sp_query.

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 27 other followers

%d bloggers like this: