Re: vertical inheritance by templating

From: Mike Kienenberger (mkienen..laska.net)
Date: Fri Jun 17 2005 - 16:11:32 EDT

  • Next message: Mike Kienenberger: "Re: vertical inheritance by templating"

    Andrus Adamchik <andru..bjectstyle.org> wrote:
    > Still there is more than one way of looking at it ...
    >
    > I am reading the EOF docs now (never used ORM inheritance in my EOF days),
    > and NeXT implemented it they way you describe it.

    The most understandable and most comprehensive description I've seen so far
    is still the Kodo JDO page.

    http://www.solarmetric.com/Software/Documentation/3.3.3/docs/ref_guide_mapping_classmapping.html

    It covers both using a restricting qualifier and/or using a matching primary
    key as the discriminator.

    > There is also a note in the EOF docs: "...if you want to perform a deep
    > fetch from Person, three fetches are performed: a fetch from Employee
    > (with a join to Person), a fetch from Customer (with a join to Person),
    > and a fetch from Person to retrieve all the Person attributes.."
    >
    > So in this respect it works sort of like horizontal inheritance.

    It's my understanding that both flat and horizontal inheritance work with
    single tables.
    Only veritical inheritance joins tables. (flat splits a single table apart,
    and horizontal duplicates the table with permutations).

    > I was coming from the fact that master table and detail tables are all
    > "one-to-one", so they share the same base ID, and when you fetch on
    > master, you'll get the whole hierarchy at once. So in a query on a
    > superclass we won't do an in-memory UNION, but will do an [outer] join
    > instead (actually this will work like current prefetching I think). Does
    > it make sense?

    I'm only using inheritance because that's what my next project requires. :)
    However, my understanding of it is limited to the database schema forced
    upon me, and what I've been able to figure out by reading the EOF and Kodo
    JDO and Hibername inheritance pages. I'm not much of an expert, but it
    sounds right to me.

    > So this looks like two different strategies (besides UNION implementation
    > gives us horizontal inheritance for free). We can encapsulate them as such
    > in the access stack, so that the same mapping can work with both.



    This archive was generated by hypermail 2.0.0 : Fri Jun 17 2005 - 16:08:58 EDT