On Jul 2, 2006, at 10:01 AM, Mr. G Brown wrote: Hello,
I have a few questions about inheritance, thanks if anybody can help.
The parent class would be a Patient, or more accurately, a PatientAlias, because with typos, name changes (marriage or otherwise) information about the same human being could appear, does appear, under several PatientAliases.
The derived class would be a VerifiedPatient, which would be like a PatientAlias, but with some more info.
A VerifiedPatient does have a "to many" relationship to PatientAliases, and a PaitentAlias has a "to one" relationship with a VerifiedPatient.
Now it would be nice to extend a PatientAlias class to a VerifiedPatient class, BUT with the "to many" and "to one" relationships will that work? or will that cause problems? Does EOgenerator work with inheritance? And what flavor of inheritance would work best here?
Well thanks for your insights.
I think you are conflating two different things, and this is making your issue a little harder to understand.
The "relationship" between two entities via inheritance is not the same "relationship" between two instances of these objects.
Inheritance has nothing to do with an EORelationship. Or rather, there are rules for setting up EORelationships. There are rules for setting up inheritance. These rules are separate sets of rules.
For example, we have an app where use a TestGroup as a parent of a TestCase. We also have a tree of arbitrary TestGroup and TestCase instances. The parentNode and childNodes relationships between instances of these classes has no effect on the inheritance, nor does the inheritance change the parentNode and childNodes relationships.
Separate the question of how instances relate to each other from the question of how your entities are defined, and each question will be clearer.
- ray
|