Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358436 - RFE: please allow the ability to get a count for a given JPA query
Summary: RFE: please allow the ability to get a count for a given JPA query
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-21 10:54 EDT by Laird Nelson CLA
Modified: 2022-06-09 10:25 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laird Nelson CLA 2011-09-21 10:54:47 EDT
Build Identifier: 2.3.0

Many UIs need the ability to get an estimate of the overall size of a domain over which a query ranges so that paging may be implemented.  Consequently it is often necessary in a JPA context to be able to get the estimated domain size for any JPA query.  Usually one does this with a query that uses the COUNT() operator.  There is, however, no reliable way to translate an arbitrary JPQL SELECT query into its SELECT COUNT(x) equivalent.  James Sutherland has proposed adding a getCount() method to JPAQuery that would produce a count of entities matching an arbitrary JPAQuery's criteria.

Reproducible: Always
Comment 1 Eclipse Webmaster CLA 2022-06-09 10:25:11 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink