Luke Opperman wrote:
> Having written this up, I can't think of how I'd really clean this up to be
> more directly supported... Thoughts? The RelatedJoin shortcut might be able to
> be cleared up, to be more of a generic multiple-level-join shortcut thing, but
> other than that... I guess I kind of like it.
I think the best way to handle this is to always make the
mapping/intersection table a first class table/object, with a serial id
column, etc. Kind of like what you did. Right now, it lurks around,
buried in RelatedJoin declarations, does not have a serial id, etc.
If it were a distinct, accessible object then users could add other
tables/objects with foreign keys pointing to the relevant mapping.
...Edmund.
|