Details
-
Type:
Improvement
-
Status:
In Progress
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.0-RC2
-
Fix Version/s: 2.3-M2
-
Component/s: None
-
Labels:None
Description
It's fairly common with pagination to want to use the same query to both return the results and the total count. It's also convenient to include some sorting into Where or Named queries. However, if you call count() on them while they have sorting options, the query will fail.
It would be great if Grails automatically ignored any sort options when calling count() or equivalent.
Issue Links
- relates to
-
GRAILS-8365
totalCount creates additional order by statement
-
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
I am reopening the issue as it is only fixed for named queries. It needs to be fixed for where queries as well.