Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Extracting a count query from a read query

This is in the context of JPA.

If I have some arbitrary JPQL query that starts like this:

SELECT <clause> FROM <arbitrary rest of query>

If I wrap the <clause> in COUNT(), will that return me the number of objects that match the query?

I am looking for an automated way to turn a generic SELECT query in JPQL into an "equivalent" COUNT query.  I am not sure if this is possible.

Best,
Laird

--
http://about.me/lairdnelson


Back to the top