-->
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.  [ 6 posts ] 
Author Message
 Post subject: Multiple cursors returned from SP
PostPosted: Tue Feb 24, 2009 7:45 am 
Newbie

Joined: Tue Feb 24, 2009 7:19 am
Posts: 3
Can Hibernate handle multiple cursors returned by Stored Procedure?

Hibernate version:3.0

Name and version of the database you are using:Oracle 10g


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 24, 2009 7:47 am 
Expert
Expert

Joined: Thu Jan 08, 2009 6:16 am
Posts: 661
Location: Germany
No, a stored procedure has to return a result set as first out parameter in order to be usable in hibernate.

_________________
-----------------
Need advanced help? http://www.viada.eu


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 24, 2009 7:49 am 
Expert
Expert

Joined: Thu Jan 08, 2009 6:16 am
Posts: 661
Location: Germany
double post, don't know why, as I clicked only once and saw only one post made.... seems to be a problem today...

_________________
-----------------
Need advanced help? http://www.viada.eu


Last edited by mmerder on Tue Feb 24, 2009 7:53 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 24, 2009 7:51 am 
Expert
Expert

Joined: Thu Jan 08, 2009 6:16 am
Posts: 661
Location: Germany
double post...

_________________
-----------------
Need advanced help? http://www.viada.eu


Top
 Profile  
 
 Post subject: Multiple cursors returned from SP
PostPosted: Tue Feb 24, 2009 8:27 am 
Newbie

Joined: Tue Feb 24, 2009 7:19 am
Posts: 3
ya, you are right I've done my previous task like this. But my question is if I want to return two ResultSet from a SP then what to do ?

Suppose I want to return an employee details and the corresponding department details of that employee, where 1st ResultSet holds the employee details and 2nd one is for department details.

my sp is like this -

SP_EMP_DTLS
( emprec OUT REF_CURSOR,
deptrec OUT REF_CURSOR,
empno IN varchar2) is
begin
.....
.....
end;

How do I get emprec and deptrec, both the resultset in java class ?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 24, 2009 8:47 am 
Expert
Expert

Joined: Fri Jan 30, 2009 1:47 am
Posts: 292
Location: Bangalore, India
As employee-department is a many to one relation you can return both in a single result set. ie an outer join record.

_________________
Regards,
Litty Preeth


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.