cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aristedes Maniatis <...@maniatis.org>
Subject Re: Mapping fake FKs as relationships?
Date Mon, 11 Jan 2010 01:21:49 GMT
On 11/01/10 12:08 PM, Kevin Menard wrote:
> More complicated would be AR's notion of polymorphic relationships, which I
> guess were added as a way to avoid join tables.

My coincidence Lachlan Deck and I were discussing this just this morning. We have to think
about what is involved, but what about an interface you can define in CM on which you can
then perform a Query? Then rather than forcing inheritance on users, you could just define
an interface.

The common examples (as per the original poster) are attachments, comments and tags. So you
want to be able to define a Taggable interface implemented by Artists, Paintings, etc. That
then ties back to Tags and a special many-many Taggable_Tags join table with "foreign_key"
and "foreign_table" fields. This implementation looks a lot like vertical inheritance, but
without the inheritance.

Do you think this is achievable? Andrus, I know you've looked at vertical inheritance... do
you think this would be a natural extension of that work, or quite different?

Ari

-- 
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

Mime
View raw message