On May 30, 2008, at 2:32 PM, Chuck Hill wrote:


On May 30, 2008, at 1:19 PM, Mike Schrag wrote:

IMHO you should never flatten a many-to-many (especially across models).
So this is interesting ... I held this same belief for years until about 6 months ago when Chuck convinced me that I was missing out :) I had some silly misunderstanding of EOF caching with respect to flattened relationships that Chuck proved was wrong. I've since been pretty happy with them (though admittedly I've never crossed model boundaries). I'm curious what you're reasoning for not flattening is? Definitely it will fail across databases boundaries (which totally makes sense), but it's not immediately obvious that (or rather why) it would fail across model boundaries onto the same database (assuming you have the EXACT same connection dictionary between the two).


I am curious too. I'd rather shoot myself than not flatten to many relationships. I'd almost rather use J2EE. Like Mike says, across databases is a problem. Across models is not if you are sensible enough to ensure consistent connection dictionaries when they load (which I think is safe to assume here).

Like I was saying to Mike, it's simply a guard against performance issues. It's like omitting inverse relationships when you know that it would be suicide if anyone tried to traverse (or inadvertently tripped) them. e.g. transaction -> user_agent is a fine relationship to model but would you even dream of modeling the inverse relationship?
Maybe you would if you only made one sale a week.

Alan



Chuck

--

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/award% 40apple.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
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