Re: [CONF] Apache Cayenne Documentation: Inheritance overview (page created)

From: Lachlan Deck (lachlan.dec..mail.com)
Date: Sun Jun 03 2007 - 16:13:13 EDT

  • Next message: Lachlan Deck: "Re: [CONF] Apache Cayenne Documentation: Inheritance overview (page created)"

    On 03/06/2007, at 6:50 PM, Andrus Adamchik wrote:

    > One note - in Cayenne discriminator column is implemented via a
    > more generic entity qualifier expression (e.g. it can match
    > multiple columns or use some custom comparison condition). This
    > approach generally prevents a simplification of a mandatory
    > discriminator column on a root class, although we may actually work
    > around it and start by implementing a simplified case (i.e. support
    > entity qualifiers in the form "attribute = constant" on all
    > subentities).
    >
    > I am still entertaining the idea that we can support vertical
    > inheritance without a designator column, and I don't think that
    > having such column in place is such a big shortcut in
    > implementation. After all the logic will be the same as with
    > horizontal inheritance - sublcass criteria is an existence of a row
    > in the subclass table).

    My understanding of the need for a discriminator column (from eof) is
    - it's only necessary if the parent is not abstract, and
    - you plan on fetching/instantiating the parent without needing to
    fetch the characteristics of the sub-entities so as to distinguish them.

    That seems to lend itself to utilising the current single-table
    implementation where such a column is used.

    How do you envisage this working otherwise?

    with regards,

    --
    

    Lachlan Deck



    This archive was generated by hypermail 2.0.0 : Sun Jun 03 2007 - 16:13:42 EDT