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 )
|