• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: EOF Inheritance, Relationships between super class and subclass
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOF Inheritance, Relationships between super class and subclass


  • Subject: Re: EOF Inheritance, Relationships between super class and subclass
  • From: "Jerry W. Walker" <email@hidden>
  • Date: Sun, 2 Jul 2006 23:04:49 -0400

Hi, G. Brown,

Although there are a couple known problems with EO inheritance, generally, it is fairly reliable. I don't see any problems with using inheritance here. I'm presuming definitions something like the following:

PatientAlias
    name
    address
    city
    state
    zip
    testResults
    validations
    verifiedPatient
    ...

VerifiedPatient extends PatientAlias
    patientAliases
    insurance
    ....

I don't see why this wouldn't work fine. You could either have the verifiedPatient attribute on the VerifiedPatient record set to null (in which case, the patientAliases to-many relationship on the VerifiedPatient would not include the self reference) or be set to point back to itself (in which case, the patientAliases to-many relationship would include it). I don't see any particular problems with either approach so long as you set up your EOModel consistently and appropriately.

Whether you include the back reference or not, you could use addObjectToBothSidesOfRelationship() throughout to establish the relationships.

Hope this helps.

Regards,
Jerry


On Jul 2, 2006, at 5:27 PM, Mr. G Brown wrote:

Yes,
A VerifiedPatient would be a subclass of a PatientAlias (from a Java perspective); they would have many properties in common, methods, validations, etc. A VerifiedPatient would link (from a SQL perspective) to many PatientAliases, and under each PatientAlias there would then be links to information entered under that alias.


But from what I have read, there are bugs with inheritance, and it might be better to just duplicate the common properties and methods.....

On Jul 2, 2006, at 4:39 PM, Ken Anderson wrote:

Mr G. Brown,

I think it would be necessary to understand your object model a little more before being able to recommend if/how to use inheritance. At the moment, I really don't see any entities you have that are good candidates for inheritance, unless I'm misunderstanding your problem. It seems to me like you need a Patient entity and a PatientAlias entity, related Patient <->> PatientAlias.


Yes, but from a Jave perspective the Patient is a subclass of PatientAlias, or should be...


Can you please give us some more detail?

Well the above is the gist of it...

Consider Mary Smith, who has some tests, then next year is Mary Doe, and gets more tests, then the next year is Mary Smith again, who gets more tests, then the following year is Mary Rogers. Now find all the info for Mary Smith/Doe/Smith/Rogers. And yes, an ID number would work...in an ideal world where there weren't any typos or mistakes with that property.


Ken

On Jul 2, 2006, at 1:01 PM, 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.



Mr. G Brown
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:
40anderhome.com


This email sent to email@hidden



Mr. G Brown
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:
40gmail.com


This email sent to email@hidden


--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial Strength Internet Enabled Systems


    email@hidden
    203 278-4085        office



_______________________________________________
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


References: 
 >EOF Inheritance, Relationships between super class and subclass (From: "Mr. G Brown" <email@hidden>)
 >Re: EOF Inheritance, Relationships between super class and subclass (From: Ken Anderson <email@hidden>)
 >Re: EOF Inheritance, Relationships between super class and subclass (From: "Mr. G Brown" <email@hidden>)

  • Prev by Date: Re: Wonder Apache 2 Adaptor Help
  • Next by Date: Re: EOF Inheritance, Relationships between super class and subclass
  • Previous by thread: Re: EOF Inheritance, Relationships between super class and subclass
  • Next by thread: Re: EOF Inheritance, Relationships between super class and subclass
  • Index(es):
    • Date
    • Thread