RE: [JIRA] Closed: (CAY-989) Garbage SQL generated for EJBQL subqueries

From: Kevin Menard (kmenar..ervprise.com)
Date: Mon Feb 25 2008 - 12:16:17 EST

  • Next message: Michael Gentry: "Re: Extended Enumerations"

    Probably not related to the issue proper, but I think one of the tests added doesn't like Derby very much. It may have been there before, though.

    Basically, I'm getting an exception saying that a subselect is only allowed to return one column, but it looks to be returning an entire row. This may have to do with EJBQL translation as well.

    Easiest way to reproduce is to run the tests with Derby.

    --
    Kevin Menard
    Servprise International, Inc.
    Remote reboot & power control for your network
    www.servprise.com +1 508.892.3823 x308


    > -----Original Message-----
    > From: Andrus Adamchik (JIRA) [mailto:dev@cayenne.apache.org]
    > Sent: Sunday, February 24, 2008 7:06 AM
    > To: dev@cayenne.apache.org
    > Subject: [JIRA] Closed: (CAY-989) Garbage SQL generated for EJBQL
    > subqueries
    >
    >
    > [ https://issues.apache.org/cayenne/browse/CAY-
    > 989?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
    >
    > Andrus Adamchik closed CAY-989.
    > -------------------------------
    >
    > Resolution: Fixed
    >
    > > Garbage SQL generated for EJBQL subqueries
    > > ------------------------------------------
    > >
    > > Key: CAY-989
    > > URL: https://issues.apache.org/cayenne/browse/CAY-989
    > > Project: Cayenne
    > > Issue Type: Bug
    > > Components: Cayenne Core Library
    > > Affects Versions: 3.0
    > > Reporter: Andrus Adamchik
    > > Assignee: Andrus Adamchik
    > > Fix For: 3.0
    > >
    > >
    > > Since EJBQL translator incorrectly reuses DISTINCT and WHERE buffers
    > between the main query and subqueries, subqueries may end up generated
    > incorrectly. E.g.:
    > > "SELECT p FROM Painting p"
    > > + " WHERE p.estimatedPrice = ALL ("
    > > + " SELECT MAX(p1.estimatedPrice) FROM Painting p1"
    > > + ")"
    > > SELECT t0.PAINTING_TITLE AS ec0_0, t0.ARTIST_ID AS ec0_1,
    > t0.PAINTING_DESCRIPTION AS ec0_2, t0.ESTIMATED_PRICE AS ec0_3,
    > t0.GALLERY_ID AS ec0_4, t0.PAINTING_ID AS ec0_5 FROM PAINTING t0 WHERE
    > t0.ESTIMATED_PRICE = ALL (SELECT MAX(t1.ESTIMATED_PRICE) FROM PAINTING
    > t1 WHERE)
    > > (notice trailing WHERE...)
    >
    > --
    > This message is automatically generated by JIRA.
    > -
    > You can reply to this email to add a comment to the issue online.



    This archive was generated by hypermail 2.0.0 : Mon Feb 25 2008 - 12:16:53 EST