Inheritance with LLBLGen

Posts   
 
    
Kodiak
User
Posts: 92
Joined: 13-Apr-2009
# Posted on: 16-Apr-2011 08:46:52   

Hi,

I'm using LLBLGen 2.6 (latest version as of a couple of months ago) with SelfServicing, VB.NET, TwoClasses 2010.

I've set up a inheritance hierachy in my database and LLBLGen as follows:

MasterProduct -> Sub-type of Product SubProduct -> Sub-Type of Product

I want MasterProduct and SubProduct to have certain properties and methods, the content of which changes for each type. MasterProduct has a collection of SubProducts (similar to a Kit).

I can define these as MustOverride in the Product but this seems to break other things in LBLLGen. If I put the Product class as MustInherit LLBL factories start to complain even though the Product is marked as Abstract from the LLBLGen designer.

No one should construct a ProductEntity, not even LLBLGen.

There are also issues as the ProductEntity inherits from ProductEntityBase.

I was wondering what is the best practice in this area?

It seems exceptionallty convoluted for something that would be trivial with POCO.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 17-Apr-2011 07:24:19   

Kodiak wrote:

Hi,

I'm using LLBLGen 2.6 (latest version as of a couple of months ago) with SelfServicing, VB.NET, TwoClasses 2010.

I've set up a inheritance hierachy in my database and LLBLGen as follows:

MasterProduct -> Sub-type of Product SubProduct -> Sub-Type of Product

I want MasterProduct and SubProduct to have certain properties and methods, the content of which changes for each type. MasterProduct has a collection of SubProducts (similar to a Kit).

If I understand you correctly, so far at this point all is working as expected. Right?

Kodiak wrote:

I can define these as MustOverride in the Product but this seems to break other things in LBLLGen. If I put the Product class as MustInherit LLBL factories start to complain even though the Product is marked as Abstract from the LLBLGen designer.

No one should construct a ProductEntity, not even LLBLGen.

There are also issues as the ProductEntity inherits from ProductEntityBase.

I don't quite follow you here. Please elaborate more on each issue you are having. What is what you want to do with that method you want to add?

David Elizondo | LLBLGen Support Team