Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> OO pl/sql nested collection limitation?

OO pl/sql nested collection limitation?

From: Matt McManus <mmcmanus_at_mail.sdsu.edu>
Date: 24 Feb 2003 16:44:04 -0800
Message-ID: <362d55a7.0302241644.48fa1102@posting.google.com>


I am attempting to build a pl/sql app using the object-oriented feautres in Oracle 8i and I have not been able to define a three-tier nested relationship containing collections. I would like to know if it is even possible. Let me explain.
If I define type A as an object :

   create or replace type A as object (

     scalar_data_fields
     -- add methods here down

);

Then create a collection of A as AList:

   create or replace type AList as
     table of A; -- also used varray(); Now I can create object B conatining an AList field:

   create or replace type B as object (

     scalar_data_fields,
     myACollection  AList
     -- add methods here down

);

However at this point when I want to create another type C which contains
a collection of B (via a BList type):

   create or replace type BList as
     table of B; -- also used varray();

No dice.
"PLS-00534: A Table type may not contain a nested table type or VARRAY." Can I assume that this is not supported or am I missing something. All code
examples from oracle only describe the two-level scenarios. This may be an oversight or just tricky marketing because I don't know of many complex apps
that can be built relying on such simple structures. If anyone can help out either by letting me know that it is not supported
or by pointing me in the direction of a solution, it would be a big help so I can start down the procedural road to solve my problem. Thanks in advance.

~matt Received on Mon Feb 24 2003 - 18:44:04 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US