Nested REF_CURSOR [message #1697099] |
Mon, 01 June 2015 14:51 |
Craig Jones Messages: 5 Registered: December 2014 |
Junior Member |
|
|
Hi,
i have a ref_cursor that returns a table type made up of an object type that contains some basic fields, but also another object type (test structure below).
I was looking for any hints on how i can read this from a REF_CURSOR returned from a stored procedure. I have tried JPA annotations @Enbedded/@Embeddable on the Java objects i created to replicate the database object types but it doesn't seem to read the nested object (it just gets set as null).
Any help on the best way to approach this would be appreciated.
nested_tab_type:
CREATE OR REPLACE TYPE nested_tab_type AS TABLE of nested_obj_type
nested_obj_type:
CREATE OR REPLACE TYPE nested_obj_type AS OBJECT
(
id NUMBER(10),
last_updated_timestamp TIMESTAMP(6),
values values_tab_type
)
values_tab_type:
CREATE OR REPLACE TYPE values_tab_type AS TABLE OF values_obj_type
values_obj_type:
CREATE OR REPLACE TYPE values_obj_type AS OBJECT
(
value_id NUMBER(10),
action_percentage NUMBER(7, 5),
)
[Updated on: Mon, 01 June 2015 14:52] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03217 seconds