Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring hibernate issue

 
Bbunty Shinde
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic