Re: advice on inheritance??
Re: advice on inheritance??
- Subject: Re: advice on inheritance??
- From: Timothy Worman <email@hidden>
- Date: Sun, 11 May 2014 14:20:42 -0700
Ted:
Rather than inheritance, I use ERXPartials for this. Have one database entity for ‘Person’ and various types of persons as partials. One database row has all of the attributes of the different types.
If not partials, I probably prefer the role pattern to inheritance.
Tim
UCLA GSE&IS
On May 11, 2014, at 1:02 PM, Theodore Petrosky <email@hidden> wrote:
> I am starting a project. I need to manage assets (people). But people will be both a User of the system and the managed asset.
>
> Also a person could be an employee of a company that needs to manage the assets.
>
> So I thought I would create a person class and do inheritance.
>
> a worker inherits from a person
> a supervisor inherits from a person
>
> Am I going nuts and too deep with inheritance? Would it be easier to have a single entity person that has booleans to identify workers or supervisors. I mean a person could be both a worker and supervisor.
>
> maybe just talking about it will help me think if through.
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden