Re: Translating outer joins

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sun Aug 20 2006 - 09:25:02 EDT

  • Next message: Mike Kienenberger: "Re: Idea for handling splits, possibly with only minor changes to alias table handling"

    On Aug 20, 2006, at 3:44 AM, Mike Kienenberger wrote:
    > After thinking about this for awhile, I'm not sure I believe it :-)

    [...]

    > So our qualifier and joins strings would need to look like this:
    >
    > q.setJoins("INNER JOIN feeType ft, INNER JOIN feeCycle fc"
    > + ",LEFT OUTER JOIN initialDoc id, LEFT OUTER JOIN permitDoc ipd"
    > + ",LEFT OUTER JOIN recurringDoc rd, LEFT OUTER JOIN permitDoc rpd")
    >
    > q.setQualifier("( ft.description = ? ) and ( ( ipd.agency = ? ) or (
    > rpd.agency = ? ) )'");

    [...]

    > The qualifier is no longer relative to the root entity -- each
    > fragment is relative to the join alias.

    Good point, so this won't be completely transparent, and the
    qualifier will have to be written differently when the joins are
    used. But it will still work.

    Andrus



    This archive was generated by hypermail 2.0.0 : Sun Aug 20 2006 - 09:26:23 EDT