Inheritance Design Question

Posts   
 
    
kioko
User
Posts: 29
Joined: 12-Dec-2009
# Posted on: 21-Jan-2010 11:24:44   

Hi Guys,

I have a design question that has been bothering me. Imagine you have created a targetperEntity Hierarchy for example Board Member Entity which is a super type of Manager Entity which is a super type of Employee. In code how do you create a Board Member entity from an existing Employee entity?

Thanks in Advance kioko

Walaa avatar
Walaa
Support Team
Posts: 14983
Joined: 21-Aug-2005
# Posted on: 21-Jan-2010 12:09:43   

Board Member Entity which is a super type of Manager Entity which is a super type of Employee

I guess you mean: Board Member Entity which is a sub-type of Manager Entity which is a sub-type of Employee.

In general, if you have a type which can be promoted to another type, then it might not be wise to use Inheritance from the start.

Otherwise you'd have to either delete the employee entity and add a BoardMemberEntity instead. Or hack the system to insert a row in the BoardMember table which refers to the specified EmployeEntity.

kioko
User
Posts: 29
Joined: 12-Dec-2009
# Posted on: 23-Jan-2010 15:28:52   

Hay,

Thanks for tip. Just out of curiosity who would you implement this.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 26-Jan-2010 04:48:04   

kioko wrote:

Hay,

Thanks for tip. Just out of curiosity who would you implement this.

I don't understand if you are happy with the answer or you want we elaborate more, or you want to keep the thread open for community answers. ( ? )

David Elizondo | LLBLGen Support Team