-->
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: Stored Procedure with custom RowType as OUT parameter
PostPosted: Mon Aug 02, 2004 7:29 pm 
Newbie

Joined: Mon Aug 02, 2004 7:22 pm
Posts: 2
Hi,
I have a stored procedure that returns a custom row type as shown below instead of result set or individual columns. How do I map this into java objects in Hibernate?. Few lines of sample code would be very helpful as I am new to Hibernate.

Another question is:
There are multiple rows for a person id in the telephone table. When I query for PersonId, I get more than one row (for multiple phonenumbers), but the following stored procedure returns one at a time. In this case, where and how do you do the looping to get all the rows and map the data to java objects in Hibernate?.

NOTE: I cannot make any changes to the PL/SQL code as the same code being used by many other applications.

Appreciate your help. Thanks.


create or replace type Tele_ROWTYPE_SQL as object (
PID NUMBER(10),
TELENUMBER NUMBER(15)
TELETYPE VARCHAR(1)
)

function getTelephoneNumbersForPerson( pid in NUMBER, TeleRec out Tele%rowtype )


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 03, 2004 4:22 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Not Possible. Probably not even with Hibernate 3.


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.