You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by bo...@apache.org on 2026/06/19 02:54:21 UTC
(grails-core) branch 8.0.x-hibernate7 updated (1cc3fdf784 -> 919dbc51a7)
This is an automated email from the ASF dual-hosted git repository.
borinquenkid pushed a change to branch 8.0.x-hibernate7
in repository https://gitbox.apache.org/repos/asf/grails-core.git
from 1cc3fdf784 Remove leftover TODO and inline comment from H7 core build.gradle
new 1dd79c0cd0 Remove @IgnoreIf(H7) from TCK RLikeSpec — all suites run it
new 919dbc51a7 Fix review comments: Query.java TODO, FirstAndLastMethodSpec failOnError, H7 plugin build comment
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
grails-data-hibernate7/grails-plugin/build.gradle | 1 -
.../grails/data/testing/tck/tests/FirstAndLastMethodSpec.groovy | 8 ++++----
.../org/apache/grails/data/testing/tck/tests/RLikeSpec.groovy | 2 --
.../src/main/groovy/org/grails/datastore/mapping/query/Query.java | 8 +++-----
4 files changed, 7 insertions(+), 12 deletions(-)
(grails-core) 01/02: Remove @IgnoreIf(H7) from TCK RLikeSpec — all suites run it
Posted by bo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
borinquenkid pushed a commit to branch 8.0.x-hibernate7
in repository https://gitbox.apache.org/repos/asf/grails-core.git
commit 1dd79c0cd08bb3724f2fa07fc2c625ffe64444f9
Author: Walter Duque de Estrada <wb...@mac.com>
AuthorDate: Thu Jun 18 18:49:25 2026 -0500
Remove @IgnoreIf(H7) from TCK RLikeSpec — all suites run it
The annotation only suppressed the TCK version on H7 in favour of the
H7-specific spec, but both use different domain classes so there is no
conflict. Removing it lets every datastore suite (including any future
GraphQL or simple-map implementation) verify rlike support via the TCK.
Co-Authored-By: Claude Sonnet 4.6 <no...@anthropic.com>
---
.../groovy/org/apache/grails/data/testing/tck/tests/RLikeSpec.groovy | 2 --
1 file changed, 2 deletions(-)
diff --git a/grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/RLikeSpec.groovy b/grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/RLikeSpec.groovy
index cf5924a432..7d0e078044 100644
--- a/grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/RLikeSpec.groovy
+++ b/grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/RLikeSpec.groovy
@@ -20,9 +20,7 @@ package org.apache.grails.data.testing.tck.tests
import grails.gorm.annotation.Entity
import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
-import spock.lang.IgnoreIf
-@IgnoreIf({ System.getProperty('hibernate7.gorm.suite') == 'true' })
class RLikeSpec extends GrailsDataTckSpec {
void setupSpec() {
(grails-core) 02/02: Fix review comments: Query.java TODO, FirstAndLastMethodSpec failOnError, H7 plugin build comment
Posted by bo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
borinquenkid pushed a commit to branch 8.0.x-hibernate7
in repository https://gitbox.apache.org/repos/asf/grails-core.git
commit 919dbc51a7229e49d497105c29812693242d715b
Author: Walter Duque de Estrada <wb...@mac.com>
AuthorDate: Thu Jun 18 19:57:14 2026 -0500
Fix review comments: Query.java TODO, FirstAndLastMethodSpec failOnError, H7 plugin build comment
- Query.java: remove stale 'will be resolved in Grails 8' from warn message and TODO;
Hibernate 7 already resolves this via HibernateQuery.countResults()
- FirstAndLastMethodSpec: remove redundant failOnError from save() calls; assert already
catches null return; keep flush:true on final save
- grails-data-hibernate7/grails-plugin/build.gradle: remove stale TODO comment
Co-Authored-By: Claude Sonnet 4.6 <no...@anthropic.com>
---
grails-data-hibernate7/grails-plugin/build.gradle | 1 -
.../grails/data/testing/tck/tests/FirstAndLastMethodSpec.groovy | 8 ++++----
.../src/main/groovy/org/grails/datastore/mapping/query/Query.java | 8 +++-----
3 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/grails-data-hibernate7/grails-plugin/build.gradle b/grails-data-hibernate7/grails-plugin/build.gradle
index 8a0245e9b9..56e9b994d5 100644
--- a/grails-data-hibernate7/grails-plugin/build.gradle
+++ b/grails-data-hibernate7/grails-plugin/build.gradle
@@ -38,7 +38,6 @@ ext {
}
dependencies {
- // TODO: Clarify and clean up dependencies
implementation platform(project(':grails-hibernate7-bom'))
api 'org.springframework.boot:spring-boot'
diff --git a/grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/FirstAndLastMethodSpec.groovy b/grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/FirstAndLastMethodSpec.groovy
index 95ec922219..2b86c982f0 100644
--- a/grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/FirstAndLastMethodSpec.groovy
+++ b/grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/FirstAndLastMethodSpec.groovy
@@ -168,10 +168,10 @@ class FirstAndLastMethodSpec extends GrailsDataTckSpec {
)
void "Test first and last method with composite key"() {
given:
- assert new PersonWithCompositeKey(firstName: 'Steve', lastName: 'Harris', age: 56).save(failOnError: true)
- assert new PersonWithCompositeKey(firstName: 'Dave', lastName: 'Murray', age: 54).save(failOnError: true)
- assert new PersonWithCompositeKey(firstName: 'Adrian', lastName: 'Smith', age: 55).save(failOnError: true)
- assert new PersonWithCompositeKey(firstName: 'Bruce', lastName: 'Dickinson', age: 53).save(failOnError: true, flush: true)
+ assert new PersonWithCompositeKey(firstName: 'Steve', lastName: 'Harris', age: 56).save()
+ assert new PersonWithCompositeKey(firstName: 'Dave', lastName: 'Murray', age: 54).save()
+ assert new PersonWithCompositeKey(firstName: 'Adrian', lastName: 'Smith', age: 55).save()
+ assert new PersonWithCompositeKey(firstName: 'Bruce', lastName: 'Dickinson', age: 53).save(flush: true)
assert PersonWithCompositeKey.count() == 4
when:
diff --git a/grails-datastore-core/src/main/groovy/org/grails/datastore/mapping/query/Query.java b/grails-datastore-core/src/main/groovy/org/grails/datastore/mapping/query/Query.java
index dc4b5da29e..baf2225986 100644
--- a/grails-datastore-core/src/main/groovy/org/grails/datastore/mapping/query/Query.java
+++ b/grails-datastore-core/src/main/groovy/org/grails/datastore/mapping/query/Query.java
@@ -631,12 +631,10 @@ public abstract class Query implements Cloneable, Serializable {
// a simple count() projection returns incorrect results because it
// appends to the existing projections rather than replacing them.
// Fall back to counting the grouped result rows.
- // TODO: This needs resolved properly in Grails 8 with Hibernate 7's
- // JpaSelectCriteria.from(Subquery) support for derived tables.
+ // Hibernate 7 resolves this via HibernateQuery.countResults() using derived-table subqueries.
logger.warn("DetachedCriteria.count() with user-defined projections cannot use a SQL count query " +
- "due to a Hibernate 5 limitation. All grouped result rows will be loaded into memory to " +
- "determine the count. This may impact performance on large result sets. " +
- "This will be resolved in Grails 8 (Hibernate 7) which supports derived table subqueries.");
+ "due to a datastore limitation. All grouped result rows will be loaded into memory to " +
+ "determine the count. This may impact performance on large result sets.");
return list().size();
}
projections().count();