On Jun 14, 2008, at 3:57 PM, Gavin Eadie wrote:

My reading would indicate that I don't want to "propagates primary key". If I do, then the creation of an Advert WILL always create a Select.


Nope. That is what Owns Destination does for a to-one, mandatory relationship.


But Selects are not mandatory, in fact in this business model they are scarce.

Why do they even have a class? If it is just two keys, just use an EOGenericRecord and flatten the relationships. Then all you need to do is to say user().addToFavoriteAdverts(ad); I don't think you should even need the addObjectToBothSidesOfRelationshipWithKey. That might cause too much faulting for popular ads.


The real world model is a bulletin board of advertisements whose users may select some favorite ads that they want to keep track of. So a boring ad will have no connecting Select, and someone who is not a frequent visitor may have no connecting Select. On the other hand a really interesting ad may have dozens of Selects (dozens of people putting it in their favorites), and a busy user may have dozens Selects (ads they are tracking). Any one Select contains only the pkeys of the Advert and Author (user) it relates. This may have been modeled badly seven years ago, but it's what I have to work with !! Gav

Seems to me like it should be no trouble at all.

Chuck



On Jun 14, 2008, at 2:55 PM, Johann Werner wrote:

Hi Gavin,

did you check "Propagates Primary Key" on the Author and Advert entity?

jw

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net

This email sent to [EMAIL PROTECTED]

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to