Re: Expression: NOT EXISTS... JOIN...

From: Jürgen Saar (jsaa..eb.de)
Date: Mon Jul 04 2005 - 02:43:31 EDT

  • Next message: Andrus Adamchik: "Re: Queries that should return single objects"

    No, this is a bit different.

    I've the same problem. Just to explain:

    We write logistics software, and have to find
    all orders that don't have a special status-entry.

    The structure:
    <Order>
      <relOrder2Events>
        ... transport event entries ...

    Example: find all orders where the event 'delivered' is missing

    In relOrder2Events you can find all events, that happened to
    the Order, to trace the whole delivery process

    cayenne-use..bjectstyle.org schrieb am 01.07.05 17:03:32:
    >
    > Zvonimir Spajic <z.spaji..scensys.de> wrote:
    > > I am trying out to build up an Expression for this SQL:
    > >
    > >
    > > SELECT * FROM user t0
    > > WHERE NOT EXISTS
    > > (SELECT * FROM map_user_role t1
    > > WHERE t0.username = t1.username)
    > >
    > >
    > > What is the best way and which typ of Expression I have to use.
    > > If there are more alternatives, please show me.
    >
    > I'm not sure what "NOT EXISTS" means, but it sounds like it's the same as
    > "NOT IN":
    >
    > public static Expression notInExp(String pathSpec, Object value)
    >

    ______________________________________________________________
    Verschicken Sie romantische, coole und witzige Bilder per SMS!
    Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193



    This archive was generated by hypermail 2.0.0 : Mon Jul 04 2005 - 02:43:41 EDT