I wish to make a move such as this
create type Item as object ( id number, subitems table of ref Item )
but oracle throws the best after i try to get it done. Is possible, and when yes then how?
Oracle won't compile your definition since the type
Item has not been put together yet. Why dont you allow mtss is a try:
CREATE OR REPLACE TYPE Item; CREATE OR REPLACE TYPE items_table IS TABLE OF REF item;
after which try:
CREATE OR REPLACE TYPE item AS OBJECT ( id number, subitems items_table )
That might be nice would it not! You could attempt this:
create type item_ids_t is table of number; create type Item as object ( id number, subitems item_ids_t);
Meaning subitems is simply a listing of ids, which may then be employed to lookup a table listed in id.