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.

Reply via email to