• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Nested Objects in Oracle

 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I need to call a Stored Proc which takes in Array of Objects as input and update the Oracle DB. I am taking the following approach, but i am struck.

//Channel

create or replace TYPE Channel_List AS OBJECT (channel_id number)

//Channel Type
create or replace TYPE ChannelList AS TABLE OF number

In the above method i created Data type for Product attribute.

//Object to Inserted

create or replace TYPE PACKAGE AS OBJECT
(
PKG_PRC_ID NUMBER,
PACKAGE_ID NUMBER,
PRODUCT_TYPES ProducttypeList,
CHANNEL_ID ChannelList
)

create or replace TYPE PACKAGE _TYPE IS TABLE OF PACKAGE

After Creating this i wrote three classes,

ProductTypeDTO
ChannelTypeDTO
PackageDTO

and implemented SQL DATA.

After this i am Struck up. Product and Channel Take multiple Values, i dont how to create descriptors for it? If i dont have ProductTypeDTO and ChannelTypeDTO then i would have created Array of PackageDTO and would have handled like this,


where arrProdSeg is array of PackageDTO.

Thanks is Advance.

Regards,
Arul.
 
Marshal
Posts: 80954
522
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bump!
 
I didn't do it. You can't prove it. Nobody saw me. The sheep are lying! This tiny ad is my witness!
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic