[
https://issues.apache.org/jira/browse/OPENJPA-658?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Richard Zowalla resolved OPENJPA-658.
-------------------------------------
Resolution: Fixed
Already fixed in an earlier release (b2812a4cc (OPENJPA-51)); closing.
> 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
> Priority: Major
>
> 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 was sent by Atlassian Jira
(v10.3.26#10030026)