LEFT JOIN avaliable?

From: Andrey Razumovsky (razumovsky.andre..mail.com)
Date: Wed May 28 2008 - 14:26:15 EDT

  • Next message: Mike Kienenberger: "Re: LEFT JOIN avaliable?"

    Hi,

    Imagine I have tables A and B. A has 'aid', 'aname' and 'bid' (relation to
    B, which is non-mandatory) fields. B has 'bid' and 'bname'.
    I want to make a selection from A but order it by 'bname'. When there is no
    B related, 'bname' must be treated as '', i.e.
    SELECT aid, aname FROM a LEFT JOIN b ON (a.bid=b.bid) ORDER BY bname.

    That's fine in SQL, but i can't find out how this is to be made with mapped
    classes in Cayenne, because when i add an ordering, Cayenne creates query
    with simple JOIN, and I need LEFT JOIN here.So how can i tell Cayenne to
    create LEFT JOIN instead? I'd prefer using SelectQuery, however any other
    hints will be appreciated too.

    Thanks,
    Andrey



    This archive was generated by hypermail 2.0.0 : Wed May 28 2008 - 14:26:49 EDT