Inheritance

Posts   
 
    
Posts: 94
Joined: 23-Aug-2006
# Posted on: 17-May-2013 02:27:14   

This is a very pedestrian question. I have two tables in the db - Organization and Bank - both have a 1:1 relationship via the OrganizationID PK. Should there be a way to produce a Bank entity that has fields from both tables ? At the moment I get a Bank with a "BankSelf" property that points to the Organization.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 17-May-2013 08:09:23   

Yes, you should make Bank a subtype of Organization: right-click on BankEntity then click on "Make subtype of" and select OrganizationEntity. For more info read this....

David Elizondo | LLBLGen Support Team
Posts: 94
Joined: 23-Aug-2006
# Posted on: 17-May-2013 16:57:25   

Thanks. For some odd reason I was under the impression the designer would understand based on the PK 1:1 relationship in the db. Appreciate your clarification.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 18-May-2013 09:27:57   

The designer understand it, but it might be that you don't want inheritance on all 1:1 relationships. You can apply inheritance directly to your model by "right-clicking" on your entiities root node and select "Construct target-per-Entity hierarchies".

David Elizondo | LLBLGen Support Team