Need help on inheritance

Posts   
 
    
Barry
User
Posts: 232
Joined: 17-Aug-2005
# Posted on: 14-Mar-2006 02:57:30   

Let say there are three entities, "Animal", "Cat" and "Dog", cat and dog are the sub types of animal, the discriminator column is AnimalType (cat: "C", dog: "D"), I do not know what discriminator value I should assign to super type animal, it does not allow me to create sub type if I leave discriminator value in super type.

I want to fetch entities like the following.

fetch all animal entities by fetching an animal collection Select * From Animal

fetch only cat entities by fetching a cat collection Select * From Animal Where AnimalType = 'C'

Thank you very much!

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 14-Mar-2006 07:18:51