borinquenkid commented on code in PR #15568:
URL: https://github.com/apache/grails-core/pull/15568#discussion_r3470035718
##########
grails-data-hibernate5/core/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriterionAdapter.java:
##########
@@ -385,6 +385,16 @@ public Criterion
toHibernateCriterion(AbstractHibernateQuery hibernateQuery, Que
}
});
+ criterionAdaptors.put(Query.SizeNotEquals.class, new
CriterionAdaptor<Query.SizeNotEquals>() {
Review Comment:
Will open a dedicated backport issue/PR against `7.0.x` to track this.
##########
grails-datastore-core/src/main/groovy/org/grails/datastore/mapping/query/Query.java:
##########
@@ -589,6 +616,32 @@ public Object singleResult() {
return results.isEmpty() ? null : results.get(0);
}
+ /**
+ * Counts the rows this query would return, respecting any existing
projections or grouping.
+ * Subclasses may override to provide an optimized implementation (e.g.,
derived-table count).
+ * The default implementation falls back to loading all rows when
user-defined projections
+ * exist, since appending a count projection would produce incorrect
results.
+ *
+ * @return The row count
+ */
+ public Number countResults() {
Review Comment:
`@since 8.0` was added to `countResults()` in commit `9b56ea16fa`.
##########
build-logic/plugins/src/test/groovy/org/apache/grails/buildsrc/GrailsCodeStylePluginSpec.groovy:
##########
@@ -19,7 +19,6 @@
package org.apache.grails.buildsrc
import org.gradle.testkit.runner.GradleRunner
-import org.gradle.testkit.runner.TaskOutcome
Review Comment:
Fixed in `8eae570169` — the missing `TaskOutcome` import was restored.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]