Re: WOL-369

From: Lachlan Deck (lachlan.dec..mail.com)
Date: Wed May 16 2007 - 02:36:08 EDT

  • Next message: Mike Schrag: "Re: [OS-JIRA] Commented: (WOL-425) Improvement for "Add new Entity index" - allow highlighted attribute(s) to populate 'name' and 'attributes' fields of new index."

    On 16/05/2007, at 4:17 PM, Lachlan Deck wrote:

    > On 16/05/2007, at 4:08 PM, Mike Schrag wrote:
    >
    >> I don't believe EOModeler can produce vertical inheritance
    >> automatically (only single table or horizontal).
    >
    > While that's true - it only takes a second to change it to
    > vertical. e.g.,
    > 1) Create EntityA (with attributes id and name).
    > 2) Select EntityA and choose Property > Create Subclass.
    > 3) select new entity and change it's names to EntityB.
    >
    > Note that the inherited attributes are simply italicised.
    >
    >> If you're seeing italicized, that would be horizontal or single
    >> table inheritance. I believe vertical requires all flattened
    >> attributes, which would be bold.
    >
    > Not unless I'm mistaken.

    Actually just re-reading the EOModeler guide... there's two parts to
    the instruction for "Implementing Vertical Mapping in a Model'

    1) 'Assuming that the entities for each of the participating tables
    do not yet exist, follow these steps to easily create subentities
    from a parent entity:'

    Only mentioned ticking or unticking the parent entity as abstract
    depending on whether you'll be fetching those objects on their own or
    not.

    2) 'Assuming that the entities for each of the participating tables
    already exist, do the following to implement vertical mapping in an
    EOModel:'

    Mentions flattening the class properties like so:
    "If you created the child entities by choosing Create Subclass from
    the Property menu, you now need to delete the attributes that are
    inherited from the parent entity. This is necessary to avoid
    redundancy since the attributes you just flattened reflect the same
    attributes as the inherited attributes do."

    But I'm not sure why they'd need to be flattened if the above example
    didn't require it... i.e., why not just accept the inherited members?
    I think they would only need to be flattened if the parent entity was
    abstract perhaps.

    with regards,

    --
    

    Lachlan Deck



    This archive was generated by hypermail 2.0.0 : Wed May 16 2007 - 02:36:16 EDT