count(*) not working on OpenJPA
GoogleCodeExporter opened this issue · 1 comments
GoogleCodeExporter commented
What steps will reproduce the problem?
1. Deploy GenericDaoJpa on OpenJPA 1.0.2
2. Execute count()
I've reported it to the OpenJPA team here:
https://issues.apache.org/jira/browse/OPENJPA-566
A nice workaround is using the following query:
Query query = em.createQuery("SELECT count(i) FROM " + entityName + " i");
This makes it work on Hibernate and OpenJPA.
Original issue reported on code.google.com by mathias....@gmail.com
on 9 Apr 2008 at 9:04
GoogleCodeExporter commented
OpenJPA guys responded. Seems like count(*) is not valid EJBQL.
Original comment by mathias....@gmail.com
on 10 Apr 2008 at 9:55
- Added labels: ****
- Removed labels: ****