Re: Setting up horizontal inheritance
Re: Setting up horizontal inheritance
- Subject: Re: Setting up horizontal inheritance
- From: Ken Anderson <email@hidden>
- Date: Sun, 2 Nov 2008 21:49:21 -0500
On Nov 1, 2008, at 10:51 PM, Paul Hoadley wrote:
I've implemented it using HI, and it seems to be working. I'm not
convinced I have it quite right, though. There's another EO in the
utility-framework's model, UserPreference. UserPreference has a to-
one relationship with Person to denote the owner of the preference.
In the particular app, though, I'm now using AMPersons, and hence
the amperson table in the database---but UserPreference.person
relationship obviously looks for a Person in the 'person' table, and
there aren't any. To overcome this, I have sub-classed
UserPreference to create AMUserPreference, with the only change
being that the person relationship points to AMPerson. This seems
inelegant to me---am I doing it right? (Or is this a candidate for
the kind of dynamic model change you refer to above?)
This is why it would be better for Person to be abstract, and have
different subentities for each application. That way, UserPreference
could have a relationship to the abstract Person entity, which would
automatically search all the subentities for the correct one for that
particular primary key.
_______________________________________________
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