FAQ
Outer joins are not supported, I know.

Meanwhile I miss being *told* when I'm attempting an outer join,
minimally runtime.

One of the reasons I'm using Cayenne is that I don't want to think
about SQL, so I don't. It hurts even thinking about thinking about how
Cayenne Expressions turn into SQL statements :-)

Would it make sense for Cayenne to throw an exception when an outer
join is attempted?

Could I attempt to implement such a detection in Cayenne myself and
submit a patch or is it fiendishly difficult?

--
Øyvind Harboe
http://www.zylin.com

Search Discussions

  • Andrus Adamchik at Aug 17, 2006 at 1:46 pm

    Would it make sense for Cayenne to throw an exception when an outer
    join is attempted?
    Could you be more specific on when it should detect that? IIRC there
    were some discussions on that in the past. You provide no references
    though.

    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):

    http://objectstyle.org/cayenne/lists/cayenne-devel/2006/08/0106.html

    Andrus
    On Aug 17, 2006, at 3:24 AM, Øyvind Harboe wrote:
    Outer joins are not supported, I know.

    Meanwhile I miss being *told* when I'm attempting an outer join,
    minimally runtime.

    One of the reasons I'm using Cayenne is that I don't want to think
    about SQL, so I don't. It hurts even thinking about thinking about how
    Cayenne Expressions turn into SQL statements :-)

    Would it make sense for Cayenne to throw an exception when an outer
    join is attempted?

    Could I attempt to implement such a detection in Cayenne myself and
    submit a patch or is it fiendishly difficult?

    --
    Øyvind Harboe
    http://www.zylin.com
  • Øyvind Harboe at Aug 17, 2006 at 2:06 pm

    On 8/17/06, Andrus Adamchik wrote:
    Would it make sense for Cayenne to throw an exception when an outer
    join is attempted?
    Could you be more specific on when it should detect that? IIRC there
    were some discussions on that in the past. You provide no references
    though.
    I guess I don't understand, because I would say "always". If an outer
    join was required for an Expression, but Cayenne didn't generate it,
    then generate an Exception.

    Isn't it unambigous when an Expression as a Qualifier requires an
    OUTER JOIN or some other SQL construct that Cayenne does not support?
    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):

    http://objectstyle.org/cayenne/lists/cayenne-devel/2006/08/0106.html
    Super!



    --
    Øyvind Harboe
    http://www.zylin.com
  • Andrus Adamchik at Aug 17, 2006 at 2:11 pm

    On Aug 17, 2006, at 10:06 AM, Øyvind Harboe wrote:

    I guess I don't understand, because I would say "always". If an outer
    join was required for an Expression, but Cayenne didn't generate it,
    then generate an Exception.

    Isn't it unambigous when an Expression as a Qualifier requires an
    OUTER JOIN or some other SQL construct that Cayenne does not support?
    No it is not unambiguous. In most cases it is up to the user. This is
    why I am asking for examples to be able to identify various cases.

    Andrus
  • Øyvind Harboe at Aug 17, 2006 at 4:09 pm

    On 8/17/06, Andrus Adamchik wrote:
    On Aug 17, 2006, at 10:06 AM, Øyvind Harboe wrote:

    I guess I don't understand, because I would say "always". If an outer
    join was required for an Expression, but Cayenne didn't generate it,
    then generate an Exception.

    Isn't it unambigous when an Expression as a Qualifier requires an
    OUTER JOIN or some other SQL construct that Cayenne does not support?
    No it is not unambiguous. In most cases it is up to the user. This is
    why I am asking for examples to be able to identify various cases.
    Is there a way to detect runtime that an Expression is ambigous?

    Can you give me an example of an ambigous Expression?

    I didn't intend any Expression that I wrote to be ambigious.

    I normally run into problems with with outer joins when I orExp()
    together complex generated Expressions.

    E.g. if Foo has e.g. multiple fields referring to
    Contact(toContactFrom, toContactTo) and I orExp together match against
    toContactFrom & toContactTo as there are Foo objects without either
    toContextFrom or toContactTo.


    --
    Øyvind Harboe
    http://www.zylin.com

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriescayenne
postedAug 17, '06 at 7:24a
activeAug 17, '06 at 4:09p
posts5
users2
websitecayenne.apache.org

2 users in discussion

Øyvind Harboe: 3 posts Andrus Adamchik: 2 posts

People

Translate

site design / logo © 2022 Grokbase