This discussion is archived
4 Replies Latest reply: Feb 1, 2013 1:30 PM by odie_63 RSS

Mutual-exclusive inheritance types

988627 Newbie
Currently Being Moderated
I have the following types:

create or replace type Film_ty as object(

create or replace type Entertainment_ty as object(
)not final;

create or replace type Spot_ty under Entertainment_ty (

create or replace type Trailer_ty under Entertainment_ty (
of_film REF Film_ty,
I created the object table for Film_ty and Entertainment_ty using "create table entertainment of Entertainment_ty" and "create table film of Film_ty" . I didn't create any collection or object table for Trailer_ty, because I read on the "Object Oriented Oracle" book that I don't have to do it if I want a mutual-exclusive inheritance relation. Now, I want to delete the trailer of a given film. How can I do such a thing if I can't access to the reference in the entertainment table, with something like "entertainment.of_film "?
I also tried a simple query of selection: "select value(e) from entertainment e;" The result is "[owner.Trailer_ty]". I can't find a way to access to the data stored in the object table entertainment referred to the Trailer_ty type.
Can you help me to solve it, please??


  • Correct Answers - 10 points
  • Helpful Answers - 5 points