Re: model insights (inheritance)
Re: model insights (inheritance)
- Subject: Re: model insights (inheritance)
- From: Chuck Hill <email@hidden>
- Date: Wed, 28 Oct 2015 14:03:45 +0000
- Thread-topic: model insights (inheritance)
Also take a look at the Role pattern which may be what you want here.
Chuck
On 2015-10-28, 6:13 AM,
"webobjects-dev-bounces+chill=email@hidden on behalf of
Alexander Spohr"
<webobjects-dev-bounces+chill=email@hidden on behalf of
email@hidden> wrote:
>One Entity for person. If you have more than 2-3 attributes in Employee
>or Donar make them own entities as well otherwise just put the attributes
>into Person.
>An Employee might become a Donar anyway ;)
>
>Subclassing in the model tends to give you problems later on.
>
> atze
>
>
>> Am 28.10.2015 um 13:51 schrieb Theodore Petrosky <email@hidden>:
>>
>> I am starting a simple CMS for a friend. He needs to track donations.
>>You know a phone bank and people taking money.
>>
>> Anyway, I have two kinds of Person. Employees that take money and
>>Donors that give. Both are Person.
>>
>> I created a model for a Person then Subclasses for Employee and Donor.
>>I am using a qualifier isEmployee=1 and isDonor=1. Obviously then I have
>>attributes isEmployee and isDonor in Person. A Person could be both an
>>Employee and a Donor.
>>
>> Would you do this, or would you model separate Entities for Employee
>>and Donar?
>
>
> _______________________________________________
>Do not post admin requests to the list. They will be ignored.
>Webobjects-dev mailing list (email@hidden)
>Help/Unsubscribe/Update your Subscription:
>om
>
>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