• 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: "The WO way"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "The WO way"


  • Subject: Re: "The WO way"
  • From: Ken Anderson <email@hidden>
  • Date: Sun, 09 Oct 2005 07:53:10 -0400

Mark,

I think you're on the right track. I have a golden rule - never have relationships from 'reference' type data to 'transactional' type data. You should use some type of fetch spec to satisfy your reporting requirements.

Ken

On Oct 9, 2005, at 5:08 AM, Mark Wardle wrote:

Hi all. Hope you don't mind me writing again! I'm trying to work out the "right way" of handling a data model.

I have a number of "User"s modelled. Each user can have any number of "Events" linked in a one-to-many join. Each event has a number of attributes, all linked one-to-one to other tables - for example "typeOfPatientFK". These attribute tables are generally static, and do not ever change. Type of patient may only have two or three records - such as "New" and "Follow-up".

Data entry and manipulation is simple given WO's way of abstracting everything. It works really well. Originally, I had a two way relationship from "TypeOfPatient" to the "Event", but after reading things about the inefficiency of this and the risk of pulling in *all* events related to that attribute, I thought about deleting the reverse relationship.

However, I will also need to generate reports. I will need to display all events related to a "TypeOfPatient" - for a particular user. If I left in the reverse relationship, I'd get all related events but for all users, not just the user in question.

Therefore, my preference would be to remove the inverse relationship from TypeOfPatient to event, and instead use a FetchSpecification. Thus, I pull out all events related to both a particular User and a particular TypeOfPatient. However, to create that, I have to determine the required primary and foreign keys - which seems to me to be a rather non-WebObjects way of doing things. Am I being stupid, or is there a "better way"?

Many thanks,

Mark

--
Dr. Mark Wardle
Clinical research fellow and Specialist Registrar in Neurology,
C2-B2 link, Cardiff University, Heath Park, CARDIFF, CF14 4XN. UK
email: email@hidden    email@hidden
office: +44(0)2920743454 facsimile: +44(0)2920743798
mob: +44(0)7786196137 home: +44(0)2920216341



_______________________________________________
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


_______________________________________________ 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: 
 >"The WO way" (From: Mark Wardle <email@hidden>)

  • Prev by Date: Re: "The WO way"
  • Next by Date: EoModeler and MySQL . error: java/sql/Savepont
  • Previous by thread: Re: "The WO way"
  • Next by thread: Re: "The WO way"
  • Index(es):
    • Date
    • Thread