Inheritance, common fields

Posts   
 
    
caseyry
User
Posts: 79
Joined: 25-Feb-2005
# Posted on: 31-Jul-2006 18:09:26   

Hi --

I'm using 1.0.2005.1; I'm attempting to use inheritance (Target-per-entity) for the first time and I've run into an "issue" that I'm wondering how you all typically handle.

Basically, every table has 4 standard/common fields: create_user_id, create_date, update_user_id, update_date which track when a record was created, updated and by whom.

The problem I'm running into is that the relations classes for the child classes don't compile due to duplicate definitions for "UserEntityUsingCreateUserId".


public override IEntityRelation UserEntityUsingCreateUserId

public virtual IEntityRelation UserEntityUsingCreateUserId

The tables/objects are: AwardEntry (parent) - AwardEntryX (child of awardEntry) - AwardEntryY (child of awardEntry)

Reading through some other posts, these fields are probably considered duplicate data since the parent already has the same fields.

My only concern with removing them on the child tables is if another program/process updates the child rows, then the parent table might not be updated. (Currently, LLBLGen is used exclusively for data access.)

How have you all handled this in your projects?

Thanks.

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 01-Aug-2006 03:40:02   

You may change the name of the child table's columns in thedesigner to avoid the duplicate name issue.

caseyry
User
Posts: 79
Joined: 25-Feb-2005
# Posted on: 03-Aug-2006 16:16:36   

bclubb wrote:

You may change the name of the child table's columns in thedesigner to avoid the duplicate name issue.

Thanks.

We decided not to worry about including update/create fields on the child and parent tables since for our purposes we can use the parent table's row and assume that the child was also updated at the same time.