[ http://issues.apache.org/jira/browse/OPENJPA-15?page=all ]
Catalina Wei updated OPENJPA-15: -------------------------------- Attachment: openjpa-15.openjpa-kernel.txt fixed JPQL.jjt grammar for conforming EJB3.0 spec. queries such as the following used to fail with SYNTAX errors, worked OK with this fix: select d.no from DeptBean d where d.name < 'Department1' or d.name > 'Department1' select e from EmpBean e join e.dept d join d.emps e1 left join e1.dept d1 where d.name = d1.name select e from EmpBean e left join e.dept d where e.salary <= all (select max(e1.salary) from EmpBean e1 left join e1.dept d1 where d.no = d1.no) select e.empid,e.hireTime from EmpBean e where e.hireTime < '12:01:00' select d from DeptBean d where d.name between 'Depaatment1' and 'Depaztment1' select d from DeptBean d where size(d.emps) +1 > 10 select d.no, max(e.salary) from DeptBean d, in(d.emps) e where e.salary > 0.0 and d.name = 'Sales'group by d.no having count(e.salary) > 1 order by d.no > EJBQL grammar needs to be updated to relfect JPA specification > -------------------------------------------------------------- > > Key: OPENJPA-15 > URL: http://issues.apache.org/jira/browse/OPENJPA-15 > Project: OpenJPA > Issue Type: Bug > Components: query > Reporter: David Wisneski > Assigned To: Catalina Wei > Attachments: openjpa-15.openjpa-kernel.txt > > > when used in subquery, SELECT has different grammar than in top most query. > SELECT NEW is not allowed. FROM in subuqery has different syntax than in top > most query. For example "FROM d.employees as e " in subquery where it > would be invalid in top query. Expression syntax in HAVING clause needs to > allow "HAVING min(e.salary) > 10 " is valid provided that e.salary is a > grouping field. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira