Insert Base Class

Posts   
 
    
Ian avatar
Ian
User
Posts: 511
Joined: 01-Apr-2005
# Posted on: 03-Apr-2009 03:42:41   

Hi,

I've got tbl_a, tbl_b and tbl_c which map onto ClassA, ClassB and ClassC. The latter two of these classes have been set in the designer to inherit from ClassA.

Question is, is it possible to have ClassB and ClassC inherit from a common base class where the base class inherits from ClassA _without _adding another table to the database?

Cheers, Ian.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 03-Apr-2009 04:43:30   

Hi Ian,

It's no possible (without modifying the templates), as far as I know. What would you want such thing?

David Elizondo | LLBLGen Support Team
Ian avatar
Ian
User
Posts: 511
Joined: 01-Apr-2005
# Posted on: 03-Apr-2009 07:13:59   

Hi, I want that so that ClassB and ClassC can share a method implementation that's not appropriate to ClassA. I think this would be possible with a TargetPerEntityHierarchy.

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 03-Apr-2009 10:14:26   

Would any of ClassB or ClassC qualify to be child of the other?

Ian avatar
Ian
User
Posts: 511
Joined: 01-Apr-2005
# Posted on: 03-Apr-2009 11:21:12   

Strictly speaking I don't think so. But its an acceptable fudge so that's probably what I'll do. stuck_out_tongue_winking_eye