-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Need help with Hibernate, stored procedures NOT with Oracle
PostPosted: Fri Apr 21, 2006 7:24 am 
Newbie

Joined: Fri Apr 21, 2006 5:44 am
Posts: 3
Location: UK
I have recently started looking into Hibernate for our next project, and so far have managed to get up and running with little fuss. However, I have been chasing around the web trying to find concrete examples of configuring Hibernate for use with stored procedures ... The information provided from Chapter 16 plus trawling the Hibernate users forum, and much of the information I found on the web does not provide decent examples of the calls from DAOs and, specifically, the Hibernate mapping files setup - *.hbm.xml. I am currently using MyQSL - moving to DB2 UDB soon - have successfully created a fully working Struts, POJO, Hibernate CRUD demo but can't find examples for the mappings when using stored procedures ...

There is a lot of talk regarding that this CAN be done, but how? and what about those NOT using Oracle?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 21, 2006 1:07 pm 
Senior
Senior

Joined: Wed Aug 17, 2005 12:56 pm
Posts: 136
Location: Erie, PA (USA)
Yes, stored procedures work, and, yes, it can be done with non-Oracle databases -- I use DB2/400. I just followed the examples in Ch 16 but rather than using { ? = call sp1() }, I use { call sp1() }. As is stated in the docs, the sp must return a resultset.

IMHO, don't use a stored procedure unless your environment requires it or you are trying to solve a difficult performance issue.

Curtis ...

_________________
---- Don't forget to rate! ----


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.