You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Catalina Wei (JIRA)" <ji...@apache.org> on 2008/07/14 06:03:31 UTC

[jira] Created: (OPENJPA-658) select count(o) in subquery or not exists subquery generates SQL with syntax error

select count(o) in subquery  or not exists subquery generates SQL with syntax error
-----------------------------------------------------------------------------------

                 Key: OPENJPA-658
                 URL: https://issues.apache.org/jira/browse/OPENJPA-658
             Project: OpenJPA
          Issue Type: Sub-task
            Reporter: Catalina Wei


Table aliase  resolution is still a problem in the following JPQL queries when query contains subqueries using select count(o) or not exists:

   1.  "select o from Order o where o.amount > (select count(o) from Order o)",
                  "select o from Order o where o.amount > (select count(o2) from Order o2)",
    2.  "select c from Customer c left join c.orders p where not exists"
                 + " (select o2 from c.orders o2 where o2 = o",

the generated incorrect SQL has an empty FROM body, for example:
  {SELECT t0.oid, t0.amount ..  FROM  WHERE ( t0.amount > (select count(....

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