Inheritance Sample on LLBLGEN 3.1

Posts   
 
    
arobadol
User
Posts: 17
Joined: 04-Jan-2007
# Posted on: 13-Jun-2011 20:52:48   

Dear all,

Is there any sample on TargetPerEntity inheritance out there on SQL Server.

I've been struggling more than three hours on this and I cannot have it working properly! rage

I cannot have the project to validate!

My exemple is as follow

BuiltProperty->Property

House->BuiltPRoperty

Appartment->BuiltProperty

Land->Property

All table have the column ID.

It is define as primary key only on table property

I had to define Unique constrain ont he column ID on BuiltPRoperty otherwise I could not create the relations ID-ID from House and appartment to BuiltProperty...

I have also defined relation on ID-ID on land to Property and BuiltPRoperty to Property

Any help would be appreciated.

Thanks

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 14-Jun-2011 07:00:18   
  • Those relations you created were created on database or LLBLGen?

  • Please show us the DDL script of the involved entities.

  • What exactly is not working? (you cant create the hierarchy, you can validate project, you cant compile code, etc.)

David Elizondo | LLBLGen Support Team
arobadol
User
Posts: 17
Joined: 04-Jan-2007
# Posted on: 15-Jun-2011 10:04:04   

Thanks for your reply.

HEre it goes.

You will find the DDL files and the LLBLGEN Project File.

Attachments
Filename File size Added on Approval
LLBLGENInheritance.zip 3,395 15-Jun-2011 10:04.38 Approved
Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 15-Jun-2011 11:37:04   

Please answer these questions:

  • Those relations you created were created on database or LLBLGen?

  • What exactly is not working? (you cant create the hierarchy, you can validate project, you cant compile code, etc.)

arobadol
User
Posts: 17
Joined: 04-Jan-2007
# Posted on: 15-Jun-2011 13:42:26   

Well,

Regarding the relations, They are defined on the database and automaticaly generated when reverse engeneering the table to Entity. So in both places...

What does not work? Well open the llblgen project and validate. You will get two error messages. It is stating that automaticaly generated relations are missing the FK mapping values. I tried so set those values manually but I then got other errors. So I went back to the original values.

I try to change the least possible options on the LLBLGEN project and make the DDL as simple as posible to facilitate the identification of the issue.

Hope this help.

Again if you have any sample of targetperentity Inheritance on the LLBLGEN framework with the DDL that might help me resolving the issue without making you loose your time.

Thanks for your time anyway.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 15-Jun-2011 14:02:08   

You don't need these relations. Please remove them from the Model.

You don't need a relation between a SuperEntity and a SubEntity.