Re: Mapping fake FKs as relationships?

From: Aristedes Maniatis (ar..aniatis.org)
Date: Sun Jan 10 2010 - 20:21:49 EST

  • Next message: Kevin Menard: "Re: Mapping fake FKs as relationships?"

    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
    



    This archive was generated by hypermail 2.0.0 : Sun Jan 10 2010 - 20:22:29 EST