File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes Spring hibernate issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Spring hibernate issue" Watch "Spring hibernate issue" New topic

Spring hibernate issue

Bbunty Shinde

Joined: Jun 16, 2010
Posts: 2
I am trying to call stored procedure(in DB2 database) using HibernateTemplate.There are 60 to 70 stored procedure,we are using in our application.I never deal with stored procedure in hibernate.
Kindly tell me what should be my approach with sample example.(with hbm file).
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

You treat stored procedures by mapping them as named queries. There are restrictions; for these and the example you crave see the Hibernate documentation.

One thing to note, for a system with an existing 60-70 stored procedures I would be hesitating to use an ORM. The SPs mean you are tied to this database, which removes one of the key benefits of ORMs (portability).

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
I agree. Here's the link:
subject: Spring hibernate issue
It's not a secret anymore!