cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Lamy (JIRA)" <j...@apache.org>
Subject [jira] Created: (CAY-1483) EJBQL produces invalid SQL when referencing multiple qualified entities
Date Tue, 21 Sep 2010 14:05:32 GMT
EJBQL produces invalid SQL when referencing multiple qualified entities 
------------------------------------------------------------------------

                 Key: CAY-1483
                 URL: https://issues.apache.org/jira/browse/CAY-1483
             Project: Cayenne
          Issue Type: Bug
          Components: Core Library
    Affects Versions: 3.0.1
            Reporter: Dave Lamy
            Priority: Minor


If an EJBQL query references multiple qualified entities (subclasses), the resulting SQL is
missing an "AND" in between the two qualifier clauses.  Example:

EJBQL:
SELECT COUNT(distinct a.id) FROM Subclass1 AS a JOIN a.subclass2 b WHERE a.name = ?1 AND b
= ?2

Produces SQL:
SELECT COUNT(DISTINCT t0.ID) AS sc0 FROM SUBCLASS_1 t0 INNER JOIN SUBCLASS_2 t1 ON (t0.SUBCLASS_2_ID
= t1.ID) WHERE t0.QUALIFIER = ? t1.QUALIFIER = ? AND t0.NAME = ? AND t1.ID = ?

Note that there is no AND between t0.QUALIFIER and t1.QUALIFIER.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message