Limitations of the entity inheritance implementation

Posts   
 
    
areel
User
Posts: 7
Joined: 06-Nov-2007
# Posted on: 28-Nov-2007 12:37:21   

Hi

I want to confirm that I understand this comment in the currrent documentation.

Mixing of hierarchy types isn't supported. If you have an entity hierarchy of type TargetPerEntityHierarchy, you can't make the root of that hierarchy a subtype of an entity to form a TargetPerEntity hierarchy and vice versa.

Take the following class hierarchy, the root is class A with attribute a, Class A has two subclasses B and C, each of these has two subclasses B1, B2 and C1,C2 respectively.

I understand the above quote to mean that it is NOT possible to have a relational schema such that class A persisted to Table A, the B branch is stored as TargetPerEntityHierarchy (all B, B1 and B2 attributes stored in Table A) while C, C1 and C2 are stored as TargetPerEntity (Foreign Keys on Table C1 and C2 to Primary Key on Table C, Foreign key on Table C to Primary Key on Table A).

I have an existing domain model with three main root classes (i.e three independent hierarchies), so (if what I write is correct), does it mean that in order to adopt llblgen I would have to choose (for each hierarchy) either TargetPerEntityHierarchy or TargetPerEntity.

What is normally suggested to people who are considering moving to llblgen but have an existing domain model and relational schema ?

Regards

Aidan

Walaa avatar
Walaa
Support Team
Posts: 14983
Joined: 21-Aug-2005
# Posted on: 28-Nov-2007 17:44:45   

Yes, for each hierarchy, either choose TargetPerEntityHierarchy or TargetPerEntity.