Re: design help
Re: design help
- Subject: Re: design help
- From: "Arturo Perez" <email@hidden>
- Date: Mon, 30 Aug 2004 11:00:49 -0400
Michael Engelhart wrote:
I have a travel FrequentTraveler table that stores frequent traveler
numbers (airline frequent flyer numbers, car rental agency requent
renter numbers, hotel frequent guest numbers, etc).
I have a CarReservation table that stores data associated with a car
reservation. Two of the allowable pieces of information are a single
airline frequent flyer number and a single car rental agency frequent
renter number. ... My
original design idea would be to keep all a customers frequent traveler
numbers (some customers can have as many as 20 or 30 if they are
business travelers) in the FrequentTraveler table in a one-to-many
relationship. I'm not sure how to model this relationship back to
FrequentTraveler so that I just store FrequentTravelId's in my
CarReservation table.
Hi Mike,
Not sure I follow the problem.
You have FrequentTraveler->>FreqTravNo
CarReservation->>FreqTravNo (it's a toMany because you allow two) or
CarReservation->FreqTravNo (if you keep airline and people numbers
separate).
To get to a FrequentTraveler from a CarReservation.
carReservation.valueForKeyPath("freqTravNo.frequentTraveler");
To set a FrequentTravelerNumber on a reservation
carReservation.addObjectToBothSidesOfRelationshipWithKey(
selectedFreqTravNo, "freqTravNo");
Is all that right?
-arturo
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
References: | |
| >design help (From: Michael Engelhart <email@hidden>) |