I'm actually somewhat opposed to flattening in any situation but when it comes to M-to-M my justification is more performance related than anything else. I actually omit joins from the model in certain situations to avoid unwanted fetches and flattening is more of a recipe for disaster than a simple join is. If you're working with a small data set then none of this is a big deal but once you get up into 10's of millions of rows in any given table then you have to be extremely careful with the modeling in order to avoid unexpected killer fetches.

You know what I work on and I think our challenges are somewhat atypical. I do believe though that they have some value as general principals because however small your data set is
to begin with, it likely will grow over time.

Alan

On May 30, 2008, at 2: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).

ms

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
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      (Webobjects-dev@lists.apple.com)
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