Re: Vertical inheritance

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Mon May 31 2010 - 12:29:03 UTC

  • Next message: Mike Kienenberger: "Re: Vertical inheritance"

    Great. this is the kind of feedback I was looking for :-)

    On May 31, 2010, at 8:17 AM, Mike Kienenberger wrote:
    > What you're suggesting could work, but we have at least one very deep
    > and wide inheritance tree in our current app, and the performance hit
    > of joining more than a hundred tables (so far) unnecessarily would
    > kill us.

    So how would you do a fetch based on discriminator column approach? I
    can think of a 2 step process:

    1. Fetch ID's + discriminator columns from the root table.
    2. Fully resolve objects, either doing joins only for the subset of
    tables that appeared in result in #1, or doing a separate query
    (without joins) for each subclass table matching the set of IDs.

    Does that sound right?

    Also I am sort of in favor of my original discriminator-free approach
    for smaller hierarchies, so wonder if a fetch strategy can be
    something specified for a given super-entity and/or query.

    Andrus



    This archive was generated by hypermail 2.0.0 : Mon May 31 2010 - 12:29:35 UTC