Inheritance entity relationships maping issues

Posts   
 
    
feng3245
User
Posts: 2
Joined: 14-Jun-2012
# Posted on: 26-Jun-2012 15:48:27   

Hello, I have two entities Teacher and mathTeacher. With mathTeacher having the property teachesMath. While Teacher having properties Id, Age, Name and Type as a discriminator value. I tried to refresh the database with the entities and have encountered a problem where they must be mapped to the same table but when I tried to change the table mapping to mathTeacher to map to the table Teacher it appears that there is no mapping for teachesMath in Teacher. So I then must also add teachesMath property also into the Teacher table. Should there not be a way for llblgen to generate the property teachesMath in Teacher without having explicitly declaring the property within the parent class?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 26-Jun-2012 23:31:25   

TaregtPerEntity - Inheritance, doesn't have a discriminator field, and the PK of the child entity should also be a FK to the parent's PK.

Is this the case at your side?