RE: Query problem!

From: Michael Schuldt (m..scensys.de)
Date: Mon Feb 17 2003 - 04:39:56 EST

  • Next message: Holger Hoffstätte: "Re: java.lang.OutOfMemoryError"

    Hi Andrus,

    thanks for your answer.

    What else can I do, if I want to create a statement to read a result set of
    objects and the objects are dependent on relations AND internal Attributes?
    I think this is an ordinary case.
    I like to get the list of objects by a single query because I like to use
    the paged queries through "setPageSize". But if I split the query in two or
    more seperate queries, I can't.

    Maybe there's another solution or is my task wrong?

    Michael

    > -----Original Message-----
    > From: Andrus Adamchik [mailto:andru..bjectstyle.org]
    > Sent: Sunday, February 16, 2003 7:13 PM
    > To: cayenne-use..bjectstyle.org
    > Subject: Re: Query problem!
    >
    >
    > Andrus Adamchik wrote:
    > > Michael,
    > >
    > > Cayenne query translator indeed creates joins before the rest of the
    > > qualifier parts. I still think that this is the correct
    > behavior and the
    > > fact that your other query worked is merely a coincedence.
    > >
    > > The the first part in your where clause, "(t0.GLOBAL = 'J')", would
    > > still do a join internally, but thanks to DISTINCT it is not visible.
    > >
    > > To see what I mean by "coincedence", try deleting ALL rows from
    > > tb_offer_usergroup_assoc table, and re-run your SQL.
    >
    > Correction. To demonstrate that joins are made with tables in the FROM
    > clause no matter what you put in WHERE clause, you will need to delete
    > data from all tables participating in the query except for tb_offers:
    >
    > tb_offer_usergroup_assoc
    > tb_usergroup
    > tb_usergroup_firm_assoc
    > tb_firm
    >
    > Andrus
    >



    This archive was generated by hypermail 2.0.0 : Mon Feb 17 2003 - 04:40:19 EST