Re: Cayenne does not throw an exception when an outer join is attempted

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Aug 17 2006 - 12:14:55 EDT

  • Next message: Mike Kienenberger: "Re: Cayenne does not throw an exception when an outer join is attempted"

    > simply have a query.setJoinType(JoinType.OUTER) to enable and disable

    I would say this should be done in Expression, not Query, as this
    affects individual joins.

    > Can you
    > provide me with shortcuts to just that part of JPA or summarize how it
    > will impact generic Cayenne outer join support?

    It is a part of EJBQL. So you can do queries like "SELECT c FROM
    Customer c LEFT JOIN c.orders o WHERE c.status = 1". As we don't have
    this piece nailed yet (whether we translate EJB QL to SQLTemplate or
    SelectQuery, or something else remains to be seen), I am not entirely
    clear what current API's this would affect. Another thing it affects
    is prefetching (aka FETCH JOIN).

    I guess if we support OUTER joins in expressions (and underlying
    query translators), we'll figure out the EJBQL part later. So let's
    not worry about bringing the two together at the moment.

    Andrus

    On Aug 17, 2006, at 11:02 AM, Mike Kienenberger wrote:

    > On 8/17/06, Andrus Adamchik <andru..bjectstyle.org> wrote:
    >> Also there is an effort underway to support outer joins (we will have
    >> to do it in 3.0 anyways as the goal is to be compatible with the JPA
    >> spec that requires them):
    >
    > Andrus, I hadn't realized this was also needed for JPA. Can you
    > provide me with shortcuts to just that part of JPA or summarize how it
    > will impact generic Cayenne outer join support? My thought was to
    > simply have a query.setJoinType(JoinType.OUTER) to enable and disable
    > outer joins, but perhaps that's not enough.
    >
    > I don't really want to learn anything more about JPA than I have to at
    > the moment :-)
    >



    This archive was generated by hypermail 2.0.0 : Thu Aug 17 2006 - 12:15:20 EDT