This week's book giveaway is in the Android forum.
We're giving away four copies of Android Programming: The Big Nerd Ranch Guide and have Bill Phillips & Chris Stewart on-line!
See this thread for details.
Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Spring hibernate issue  RSS feed

 
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
Boost this thread!