Question: Create Sub-Type for Hierarchy

Posts   
 
    
ianvink
User
Posts: 394
Joined: 15-Dec-2006
# Posted on: 26-Dec-2006 01:56:26   

In the Inheritance Tutorial...

What is the purpose of setting a super-type discriminator value of 1 for the CarType? I understand why Sub-Type Discriminators are needed, but not the Super-Type.

"1" Is for a "CompanyCar" Why is this not a Sub-Type?

Thanks for helping me understand.

Ian

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 26-Dec-2006 07:46:09   

It's used to set the descriminator column when you insert an entity of that supertype into the table. In order not to leave the value as null.