"The WO way"
"The WO way"
- Subject: "The WO way"
- From: Mark Wardle <email@hidden>
- Date: Sun, 9 Oct 2005 10:08:22 +0100
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:
This email sent to email@hidden