grails 3.3 gorm where query with projection count() different than list().size()
问题 According to the Gorm 6 documentation section 7.4 the Where Query returns a DetachedCriteria , which provides a method count() that is supposed to return the number of records returned by the query. In fact, as far as I can tell, if dc is an instance of DetachedCriteria , then dc.count() == dc.list().size() must hold true. In the case of a Where Query containing a projection, count() seems to return something else. In this simple example: query = Runner.where { projections { groupProperty