Skip to content

build: remove Hibernate 5 support - #16350

Closed
borinquenkid wants to merge 24 commits into
9.0.x-h7-improvement-phase3from
9.0.x-remove-h5
Closed

borinquenkid wants to merge 24 commits into
9.0.x-h7-improvement-phase3from
9.0.x-remove-h5

Conversation

@borinquenkid

Copy link
Copy Markdown
Member

Summary

Removes Hibernate 5 support from the framework. Hibernate 5 is LGPL-licensed; Hibernate 7 is Apache-licensed, so this is a license-compliance change, not just a cleanup — Hibernate 7 (grails-data-hibernate7) is now the framework's sole GORM-for-Hibernate implementation.

  • Deletes the grails-data-hibernate5 module family, grails-hibernate5-bom, and the dedicated Hibernate 5 functional-test examples. Every general-purpose test module that merely used Hibernate 5 as its GORM datastore (app1/app2/app3, geb, scaffolding, redis, spring-security/, graphql/, grails-test-suite-persistence, grails-test-suite-uber, grails-fields, grails-views-gson, end-to-end/legacy-commands) is switched to grails-data-hibernate7/grails-hibernate7-bom.
  • Removes the hibernate5Functional CI job and dead onlyHibernate5Tests/skipHibernate5Tests flags. Adds a grails-profiles/base/features/hibernate7 feature (replacing the deleted hibernate5 one) wired into the web/rest-api/rest-api-plugin profiles.
  • A broad sweep caught real production-code and test fallout beyond build config: an orphaned AST-transform-priority constant in grails-common, dead plugin-load-order entries in mongodb/quartz/spring-security, a real BOM-validation-allowlist gap in grails-gradle/build-logic (a typo'd bom = 'grails-hibernate5-bom' would previously have been silently accepted before failing confusingly downstream), and 9 GORM TCK spec files with dead hibernate5.gorm.suite conditions.
  • Updates the grails-doc/grails-data-docs guide prose (~55 files) that referenced Hibernate 5 as the framework default or linked to the now-removed module's docs.
  • grails-forge (the separate application-generator build) had its own fully parallel GormImpl.HIBERNATE5 option and GrailsDataHibernate5 feature class, defaulting to Hibernate 5. Removes it; GormImpl.DEFAULT_OPTION becomes HIBERNATE7. Explicitly requesting the removed value is now rejected with a clear error at every layer (CLI flag, --features flag, GormImpl.parse) rather than silently substituted.

Historical/version-scoped references were deliberately left alone: RENAME.md, the Grails 7→8 upgrade skill and upgrade guides (where Hibernate 5 was still current), and @Issue links to the old grails/gorm-hibernate5 GitHub repository.

Test plan

  • ./gradlew help — full-repo configuration check, clean
  • Every touched module compiled/tested individually during development (grails-common, grails-datamapping-tck, grails-quartz, grails-spring-security, grails-data-mongodb, grails-data-hibernate7-dbmigration, build-logic plugin specs, grails-gradle, grails-profiles-base/web/rest-api/rest-api-plugin)
  • ./gradlew :grails-doc:publishGuide — full guide render, zero unresolved attribute placeholders
  • ./gradlew build for the full grails-forge project (core, api, cli, analytics-postgres, and the netty/undertow/tomcat runners) — all tests pass, including new regression coverage proving gorm-hibernate5 and --gorm hibernate5 are cleanly rejected
  • Full monorepo ./gradlew build --rerun-tasks was not run given the scope of this change (1269 files); CI will cover it

🤖 Generated with Claude Code

borinquenkid and others added 4 commits September 16, 2026 22:14
Deletes the grails-data-hibernate5 module family (core, spring-orm,
docs, grails-plugin, dbmigration, boot-plugin) and grails-hibernate5-bom,
along with the dedicated Hibernate 5 functional-test examples
(grails-test-examples/hibernate5/*, mongodb/hibernate5, neo4j/hibernate5).

General-purpose test modules that only used Hibernate 5 as their GORM
datastore (app1/app2/app3, geb, scaffolding, redis, spring-security/*,
graphql/*, grails-test-suite-persistence, grails-test-suite-uber,
grails-fields, grails-views-gson, end-to-end/legacy-commands, etc.) are
switched to grails-data-hibernate7 / grails-hibernate7-bom instead.

end-to-end/spring-dependency-management drops its GORM dependency
entirely, since it never had domain classes and exists only to verify
the Spring Dependency Management Maven-BOM-import mechanism.

Also cleans up build wiring left dangling by the removal: dead
onlyHibernate5Tests/skipHibernate5Tests test-selection flags, the
hibernate5-specific BOM constraint block and liquibase-hibernate5.version
in dependencies.gradle, publish/rat root config entries, the
grails-doc BOM-documentation and config-reference generation tasks
(now hibernate7-only), and the grails-data-mongodb-docs build that
referenced the deleted mongodb/hibernate5 example.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…and remaining source references

Removes the hibernate5Functional CI job and dead onlyHibernate5Tests/
skipHibernate5Tests flag references from .github/workflows/gradle.yml
and sitemesh2.yml.

Adds a grails-profiles/base/features/hibernate7 feature (mirroring the
removed hibernate5 feature's dependencies/skeleton, plus the
grails-hibernate7-bom platform grails-bom no longer provides for it)
and repoints the web/rest-api/rest-api-plugin profiles and the Spring
Security REST testapp-profile templates at it.

A broader case-insensitive sweep surfaced real production-code and
test references beyond build config:

- grails-common: removed the orphaned HIBERNATE5_ORDER AST-transform
  priority constant (zero live consumers - its only consumer was the
  now-deleted module).
- grails-data-mongodb, grails-quartz, grails-spring-security: removed
  dead 'hibernate5' entries from loadAfter/hasGrailsPlugin plugin
  load-order checks.
- grails-data-hibernate7/dbmigration: fixed its own plugin descriptor
  and README still pointing at a hibernate5 documentation URL.
- build-logic (SbomPlugin, GrailsDependencyValidatorPlugin): removed
  dead grails-hibernate5-bom / grails-data-hibernate5* license-exception
  entries, and updated the two specs that exercised them to use the
  still-real grails-data-hibernate7-dbmigration-core CDDL exemption
  instead. The removed comments confirm the underlying motivation:
  Hibernate 5 is LGPL-licensed; Hibernate 7 is Apache-licensed.
- grails-gradle (GrailsGradlePlugin, GrailsExtension): removed
  grails-hibernate5-bom / grails-hibernate5-micronaut-bom from the BOM
  validation allowlists and the user-facing error message, closing a
  gap where a typo'd grails { bom = 'grails-hibernate5-bom' } would
  have been silently accepted before failing confusingly downstream.
- grails-datamapping-tck: dropped the dead hibernate5.gorm.suite
  alternative from 9 spec files' @Requires/@IgnoreIf/@PendingFeatureIf
  conditions (hibernate7.gorm.suite already covered real behavior in
  every case, so this is a no-op for actual test execution) and
  removed one @PendingFeatureIf that had become permanently inert.
- THREAT_MODEL.md, threat-model.yaml, and four module READMEs: fixed
  paths/links pointing at the deleted module.
- DEVELOPMENT.md, .agents/skills/gradle-developer/SKILL.md: dropped
  the dead onlyHibernate5Tests/skipHibernate5Tests flag docs.

Left alone as accurate historical/version-scoped record rather than
current-state claims: RENAME.md, etc/bin/rename_gradle_artifacts.sh,
.agents/skills/grails-8-upgrade/SKILL.md (scoped to 7.x->8, where h5
still existed), @issue links to the old grails/gorm-hibernate5 GitHub
repo, releaseHistory.adoc, and .github/dependency-graph/
external-references.yml (real historically-published Maven artifacts).

Verified by compiling/testing the affected modules directly: grails-
common, grails-datamapping-tck, grails-quartz, grails-spring-security,
grails-data-mongodb, grails-data-hibernate7-dbmigration, build-logic's
plugin specs, grails-gradle, and the grails-profiles-base/web/rest-api/
rest-api-plugin modules (confirming the new hibernate7 feature
packages correctly).

Still deferred: the grails-doc/grails-data-docs guide-prose sweep
(~80 .adoc files using {hibernate5Guide}-style attributes) and
grails-forge, which has its own separate, parallel GrailsDataHibernate5
feature class in its own build.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…e 5 removal

Renames the {hibernate5Guide}/{hibernate5GuideFromRef}/{hibernate5Reference}
asciidoctor attributes to their hibernate7 equivalents in grails-doc/build.gradle
(pointing at the hibernate7 doc-site path and the Hibernate 7.4 user guide) and
swaps every {hibernate5Guide}-style reference across ~55 .adoc files
(Constraints, Database Mapping, Domain Classes, Plug-ins reference pages) to
match. Also restores a getVersion("hibernate-core") lookup - via a
grails-data-hibernate7 + grails-hibernate7-bom dependency grails-doc needs
again now that the old grails-data-hibernate5 dependency is gone - and
repoints the five Domain Classes pages that link to Hibernate's own javadoc
(delete/discard/lock/merge/refresh) at the correct org.hibernate.orm groupId
and version.

Rewrites substantive prose that described Hibernate 5 as the current
default: GORM.adoc's "Hibernate Versions" section, configGORM.adoc, and
ref/Plug-ins/hibernate.adoc's Spring-bean descriptions (which pointed at
the deleted grails-data-hibernate5-spring-orm module). Updates the profile
guide pages' feature listing (hibernate5 -> hibernate7, matching the
grails-profiles feature renamed in the previous commit) and profileStructure.adoc's
example dependency coordinate. Fixes dead links to the deleted module/docs in
the grails-data-mapping website homepage, the guide-developer getting-started
page, four guide-rx pages, grails-data-mongodb's queryingBasics.adoc, and the
schema-export.adoc command example (which also had incorrect artifact names
before this change).

Left alone as accurate historical/practical content, not stale current-state
claims: the upgrading40x/70x/80x.adoc guides (each scoped to describing what
was true at that Grails version, including the still-relevant Hibernate 5 to
Hibernate 7 migration walkthrough in upgrading80x.adoc that dataSource.adoc,
configGORM.adoc and GORM.adoc all link to), Database Mapping/id.adoc's note
about Hibernate ORM's own hilo-generator history, grails-data-docs's
guide-whats-new (a dated release announcement), and every commandLine/*.adoc
and ref/Command Line/*.adoc CLI reference page describing the -d/--data and
--features flags - those describe grails-forge's own GormImpl feature
options, a separate build not yet touched.

Verified by actually running ./gradlew :grails-doc:publishGuide end to end:
the rendered guide has zero unresolved {hibernate5...} attribute
placeholders, and hibernate7Version correctly resolves to 7.4.7.Final in
the generated javadoc.io links.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
grails-forge is the application generator's own separate build; it had a
fully parallel GormImpl.HIBERNATE5 option and GrailsDataHibernate5 feature
class alongside the Hibernate 7 one, defaulting to Hibernate 5.

Removes GrailsDataHibernate5 and the now-vacuous GrailsDataHibernateValidator
(which only existed to reject selecting both Hibernate implementations at
once - there is only one now). GormImpl.DEFAULT_OPTION becomes HIBERNATE7,
the HIBERNATE5 enum constant is removed, and the legacy "hibernate" CLI/API
alias now resolves to HIBERNATE7 instead. GrailsDataHibernate7 gets the
@primary annotation GrailsDataHibernate5 held, since PostgreSQL/SQLServer/
MySQL/GraphqlGorm/AsyncGorm/DatabaseDriverFeature all constructor-inject the
concrete Hibernate feature class as their "default to Hibernate when no GORM
provider is chosen" fallback - all six were retyped from
GrailsDataHibernate5 to GrailsDataHibernate7. DatabaseMigrationPlugin's
artifact-selection ternary (hibernate7-dbmigration vs hibernate5-dbmigration)
collapses to the sole surviving artifact, and its stale hibernate5 doc URL
is fixed. The two Spring Security domain-class templates drop the now-moot
gorm-hibernate5 alternative from their feature check.

Explicitly requesting the removed value is rejected with a clear error
rather than silently substituted, at every layer: the "-d/--data"/"-g/--gorm"
CLI flag (GormImplConverter throws TypeConversionException; verified with a
real PicocliRunner.run() invocation, not just unit-level reasoning), and the
"--features gorm-hibernate5" feature-selection path (already throws
"The requested feature does not exist" from existing framework code, now
covered by a regression test). GormImpl.parse("hibernate5") returns null
(unresolvable) rather than matching any constant.

Fixes a pre-existing bug this surfaced in the test fixture BuildBuilder:
renderBuildSrc() built its Options with a constructor that silently dropped
whatever .gormImpl(...) the test had set, always falling back to
GormImpl.DEFAULT_OPTION. This was invisible while the default happened to
be HIBERNATE5 (the exact value every prior renderBuildSrc() test needed);
switching the default to HIBERNATE7 exposed it. render() already used the
correct constructor - renderBuildSrc() now matches it.

Verified with a full `./gradlew build` across every grails-forge module
(core, api, cli, analytics-postgres, and the netty/undertow/tomcat runners):
all tests pass, including new regression coverage proving gorm-hibernate5
and --gorm hibernate5 are now cleanly rejected rather than silently
mishandled.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 17, 2026 18:28
Caught by codeStyle (CodeNarc's ConsecutiveBlankLines rule) after
removing the now-unused spock.lang.PendingFeatureIf import in
f4a8b90.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

One or more issues must be addressed before approval.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Removes Hibernate 5 support and makes Hibernate 7 the sole GORM-for-Hibernate implementation.

Changes:

  • Deletes Hibernate 5 modules, BOMs, examples, CI flags, and publication entries.
  • Migrates examples, profiles, tests, and documentation to Hibernate 7.
  • Updates Grails Forge defaults and rejects Hibernate 5 selections.
File summaries
File Description
threat-model.yaml Updated as part of this pull request.
grails-views-gson/build.gradle Updated as part of this pull request.
grails-test-suite-uber/build.gradle Updated as part of this pull request.
grails-test-suite-persistence/build.gradle Updated as part of this pull request.
grails-test-examples/views-functional-tests/build.gradle Updated as part of this pull request.
grails-test-examples/test-phases/build.gradle Updated as part of this pull request.
grails-test-examples/spring-security/ui/simple/build.gradle Updated as part of this pull request.
grails-test-examples/spring-security/ui/extended/build.gradle Updated as part of this pull request.
grails-test-examples/spring-security/ldap/retrieve-group-roles/build.gradle Updated as part of this pull request.
grails-test-examples/spring-security/ldap/retrieve-db-roles/build.gradle Updated as part of this pull request.
grails-test-examples/spring-security/ldap/functional-test-app/build.gradle Updated as part of this pull request.
grails-test-examples/spring-security/ldap/custom-user-details-context-mapper/build.gradle Updated as part of this pull request.
grails-test-examples/spring-security/core/misc-functional-test-app/roles/build.gradle Updated as part of this pull request.
grails-test-examples/spring-security/core/misc-functional-test-app/group/build.gradle Updated as part of this pull request.
grails-test-examples/spring-security/core/integration-test-app/build.gradle Updated as part of this pull request.
grails-test-examples/spring-security/core/functional-test-app/build.gradle Updated as part of this pull request.
grails-test-examples/spring-security/cas/test1/build.gradle Updated as part of this pull request.
grails-test-examples/spring-security/acl/integration-test-app/build.gradle Updated as part of this pull request.
grails-test-examples/spring-security/acl/functional-test-app/build.gradle Updated as part of this pull request.
grails-test-examples/scaffolding/build.gradle Updated as part of this pull request.
grails-test-examples/scaffolding-fields/build.gradle Updated as part of this pull request.
grails-test-examples/redis/build.gradle Updated as part of this pull request.
grails-test-examples/neo4j/hibernate5/grails-app/init/functional/tests/Application.groovy Updated as part of this pull request.
grails-test-examples/neo4j/hibernate5/grails-app/init/BootStrap.groovy Updated as part of this pull request.
grails-test-examples/neo4j/hibernate5/grails-app/domain/functional/tests/Book.groovy Updated as part of this pull request.
grails-test-examples/neo4j/hibernate5/grails-app/domain/functional/tests/Author.groovy Updated as part of this pull request.
grails-test-examples/neo4j/hibernate5/grails-app/conf/spring/resources.groovy Updated as part of this pull request.
grails-test-examples/namespaces/build.gradle Updated as part of this pull request.
grails-test-examples/mongodb/hibernate5/grails-app/init/functional/tests/Application.groovy Updated as part of this pull request.
grails-test-examples/mongodb/hibernate5/grails-app/init/BootStrap.groovy Updated as part of this pull request.
grails-test-examples/mongodb/hibernate5/grails-app/domain/functional/tests/Book.groovy Updated as part of this pull request.
grails-test-examples/mongodb/hibernate5/grails-app/domain/functional/tests/Author.groovy Updated as part of this pull request.
grails-test-examples/mongodb/hibernate5/grails-app/controllers/UrlMappings.groovy Updated as part of this pull request.
grails-test-examples/mongodb/hibernate5/grails-app/conf/spring/resources.groovy Updated as part of this pull request.
grails-test-examples/latency/build.gradle Updated as part of this pull request.
grails-test-examples/issue-views-182/build.gradle Updated as part of this pull request.
grails-test-examples/issue-698-domain-save-npe/build.gradle Updated as part of this pull request.
grails-test-examples/hyphenated/build.gradle Updated as part of this pull request.
grails-test-examples/hibernate5/standalone-hibernate/src/test/resources/simplelogger.properties Updated as part of this pull request.
grails-test-examples/hibernate5/spring-boot-hibernate/src/main/resources/application.yml Updated as part of this pull request.
grails-test-examples/hibernate5/spring-boot-hibernate/src/main/groovy/example/BookService.groovy Updated as part of this pull request.
grails-test-examples/hibernate5/spring-boot-hibernate/src/main/groovy/example/Book.groovy Updated as part of this pull request.
grails-test-examples/hibernate5/grails-multiple-datasources/grails-app/domain/example/Book.groovy Updated as part of this pull request.
grails-test-examples/hibernate5/grails-hibernate/grails-app/services/functional/tests/BookService.groovy Updated as part of this pull request.
grails-test-examples/hibernate5/grails-hibernate/grails-app/domain/functional/tests/Person.groovy Updated as part of this pull request.
grails-test-examples/hibernate5/grails-hibernate/grails-app/domain/functional/tests/Organization.groovy Updated as part of this pull request.
grails-test-examples/hibernate5/grails-hibernate/grails-app/domain/functional/tests/Employee.groovy Updated as part of this pull request.
grails-test-examples/hibernate5/grails-hibernate/grails-app/domain/functional/tests/Business.groovy Updated as part of this pull request.
grails-test-examples/hibernate5/grails-hibernate/grails-app/domain/functional/tests/Book.groovy Updated as part of this pull request.
grails-test-examples/hibernate5/grails-hibernate/grails-app/conf/spring/resources.groovy Updated as part of this pull request.
grails-test-examples/hibernate5/grails-data-service/grails-app/views/object/_object.gson Updated as part of this pull request.
grails-test-examples/hibernate5/grails-data-service/grails-app/views/notFound.gson Updated as part of this pull request.
grails-test-examples/hibernate5/grails-data-service/grails-app/views/error.gson Updated as part of this pull request.
grails-test-examples/hibernate5/grails-data-service/grails-app/services/example/TestService.groovy Updated as part of this pull request.
grails-test-examples/hibernate5/grails-data-service/grails-app/services/example/PersonService.groovy Updated as part of this pull request.
grails-test-examples/hibernate5/grails-data-service/grails-app/services/example/BookService.groovy Updated as part of this pull request.
grails-test-examples/hibernate5/grails-data-service/grails-app/init/example/BootStrap.groovy Updated as part of this pull request.
grails-test-examples/hibernate5/grails-data-service/grails-app/init/example/Application.groovy Updated as part of this pull request.
grails-test-examples/hibernate5/grails-data-service/grails-app/domain/example/Student.groovy Updated as part of this pull request.
grails-test-examples/hibernate5/grails-data-service/grails-app/domain/example/Person.groovy Updated as part of this pull request.
grails-test-examples/hibernate5/grails-data-service/grails-app/domain/example/Book.groovy Updated as part of this pull request.
grails-test-examples/hibernate5/grails-data-service/grails-app/conf/spring/resources.groovy Updated as part of this pull request.
grails-test-examples/hibernate5/criteria-extension/src/main/resources/META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModule Updated as part of this pull request.
grails-test-examples/hibernate5/criteria-extension/grails-app/init/example/BootStrap.groovy Updated as part of this pull request.
grails-test-examples/hibernate5/criteria-extension/grails-app/init/example/Application.groovy Updated as part of this pull request.
grails-test-examples/hibernate5/criteria-extension/grails-app/domain/example/Product.groovy Updated as part of this pull request.
grails-test-examples/graphql/spring-boot-app/build.gradle Updated as part of this pull request.
grails-test-examples/graphql/grails-test-app/build.gradle Updated as part of this pull request.
grails-test-examples/graphql/grails-tenant-app/build.gradle Updated as part of this pull request.
grails-test-examples/graphql/grails-multi-datastore-app/build.gradle Updated as part of this pull request.
grails-test-examples/graphql/grails-docs-app/build.gradle Updated as part of this pull request.
grails-test-examples/gorm/build.gradle Updated as part of this pull request.
grails-test-examples/geb/build.gradle Updated as part of this pull request.
grails-test-examples/geb-gebconfig/build.gradle Updated as part of this pull request.
grails-test-examples/geb-context-path/build.gradle Updated as part of this pull request.
grails-test-examples/external-configuration/build.gradle Updated as part of this pull request.
grails-test-examples/exploded/build.gradle Updated as part of this pull request.
grails-test-examples/demo33/build.gradle Updated as part of this pull request.
grails-test-examples/datasources/build.gradle Updated as part of this pull request.
grails-test-examples/database-cleanup/build.gradle Updated as part of this pull request.
grails-test-examples/config-report/build.gradle Updated as part of this pull request.
grails-test-examples/async-events-pubsub-demo/build.gradle Updated as part of this pull request.
grails-test-examples/app3/build.gradle Updated as part of this pull request.
grails-test-examples/app2/build.gradle Updated as part of this pull request.
grails-test-examples/app1/build.gradle Updated as part of this pull request.
grails-spring-security/rest/testapp-profile/features/data2/feature.yml.tmpl Updated as part of this pull request.
grails-spring-security/rest/testapp-profile/features/data1/feature.yml.tmpl Updated as part of this pull request.
grails-spring-security/plugin/src/main/groovy/grails/plugin/springsecurity/SpringSecurityCoreGrailsPlugin.groovy Updated as part of this pull request.
grails-quartz/src/main/groovy/quartz/QuartzGrailsPlugin.groovy Updated as part of this pull request.
grails-profiles/web/profile.yml Updated as part of this pull request.
grails-profiles/rest-api/profile.yml Updated as part of this pull request.
grails-profiles/rest-api-plugin/profile.yml Updated as part of this pull request.
grails-profiles/base/features/hibernate7/feature.yml Updated as part of this pull request.
grails-profiles/base/features/hibernate5/feature.yml Updated as part of this pull request.
grails-gsp/spring-boot/README.md Updated as part of this pull request.
grails-gradle/plugins/src/test/groovy/org/grails/gradle/plugin/core/GrailsExtensionSpec.groovy Updated as part of this pull request.
grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core/GrailsExtension.groovy Updated as part of this pull request.
grails-gradle/gradle/test-config.gradle Updated as part of this pull request.
grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/feature/security/SpringBootStarterSecuritySpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/feature/security/GrailsSpringSecuritySpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/SQLServerSpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/PostgresSpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/MySQLSpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/BuildBuilder.groovy Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/security/template/userClassic.rocker.raw Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/security/template/user.rocker.raw Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/grails/GrailsBase.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/database/SQLServer.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/database/PostgreSQL.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/database/MySQL.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/database/H2.java Updated as part of this pull request.
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/database/GrailsDataHibernate7.java Updated as part of this pull request.
grails-forge/grails-forge-api/src/test/groovy/org/grails/forge/api/FeatureControllerSpec.groovy Updated as part of this pull request.
grails-forge/grails-forge-analytics-postgres/src/test/groovy/org/grails/forge/analytics/postgres/StoreGeneratedProjectStatsSpec.groovy Updated as part of this pull request.
grails-fields/build.gradle Updated as part of this pull request.
grails-doc/src/en/ref/Plug-ins/domainClasses.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Domain Classes/withTransaction.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Domain Classes/withCriteria.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Domain Classes/whereAny.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Domain Classes/where.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Domain Classes/refresh.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Domain Classes/namedQueries.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Domain Classes/merge.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Domain Classes/mapping.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Domain Classes/lock.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Domain Classes/findOrSaveBy.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Domain Classes/findOrCreateBy.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Domain Classes/findBy.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Domain Classes/findAllBy.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Domain Classes/findAll.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Domain Classes/find.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Domain Classes/fetchMode.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Domain Classes/executeQuery.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Domain Classes/embedded.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Domain Classes/discard.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Domain Classes/delete.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Domain Classes/createCriteria.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Domain Classes/countBy.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Domain Classes/belongsTo.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Database Mapping/version.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Database Mapping/lazy.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Database Mapping/id.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Database Mapping/fetch.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Database Mapping/cache.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Database Mapping.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Constraints/unique.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Constraints/size.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Constraints/scale.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Constraints/range.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Constraints/nullable.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Constraints/minSize.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Constraints/min.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Constraints/maxSize.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Constraints/max.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Constraints/inList.adoc Updated as part of this pull request.
grails-doc/src/en/ref/Command Line/schema-export.adoc Updated as part of this pull request.
grails-doc/src/en/guide/upgrading/upgrading40x.adoc Updated as part of this pull request.
grails-doc/src/en/guide/profiles/webProfile.adoc Updated as part of this pull request.
grails-doc/src/en/guide/profiles/webPluginProfile.adoc Updated as part of this pull request.
grails-doc/src/en/guide/profiles/restAPIProfile.adoc Updated as part of this pull request.
grails-doc/src/en/guide/profiles/restAPIPluginProfile.adoc Updated as part of this pull request.
grails-doc/src/en/guide/profiles/profileStructure.adoc Updated as part of this pull request.
grails-doc/src/en/guide/profiles/profileProfile.adoc Updated as part of this pull request.
grails-doc/src/en/guide/profiles/pluginProfile.adoc Updated as part of this pull request.
grails-doc/src/en/guide/introduction.adoc Updated as part of this pull request.
grails-doc/src/en/guide/conf/dataSource/automaticDatabaseMigration.adoc Updated as part of this pull request.
grails-doc/src/en/guide/conf/dataSource.adoc Updated as part of this pull request.
grails-doc/src/en/guide/conf/config/configGORM.adoc Updated as part of this pull request.
grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/WhereQueryLeftJoinSpec.groovy Updated as part of this pull request.
grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/WhereQueryEmbeddedSpec.groovy Updated as part of this pull request.
grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/ValidationSpec.groovy Updated as part of this pull request.
grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/OptimisticLockingSpec.groovy Updated as part of this pull request.
grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/NullValueEqualSpec.groovy Updated as part of this pull request.
grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/GroovyProxySpec.groovy Updated as part of this pull request.
grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/FirstAndLastMethodSpec.groovy Updated as part of this pull request.
grails-data-neo4j/README.md Updated as part of this pull request.
grails-data-neo4j/grails-plugin/build.gradle Updated as part of this pull request.
grails-data-mongodb/grails-plugin/src/main/groovy/grails/plugins/mongodb/MongodbGrailsPlugin.groovy Updated as part of this pull request.
grails-data-mongodb/docs/src/docs/asciidoc/testing.adoc Updated as part of this pull request.
grails-data-mongodb/docs/src/docs/asciidoc/querying/queryingBasics.adoc Updated as part of this pull request.
grails-data-mongodb/docs/build.gradle Updated as part of this pull request.
grails-data-hibernate7/docs/build.gradle Updated as part of this pull request.
grails-data-hibernate7/dbmigration/src/main/groovy/org/grails/plugins/databasemigration/DatabaseMigrationGrailsPlugin.groovy Updated as part of this pull request.
grails-data-hibernate7/dbmigration/README.md Updated as part of this pull request.
grails-data-hibernate5/spring-orm/src/main/resources/META-INF/NOTICE Updated as part of this pull request.
grails-data-hibernate5/README.md Updated as part of this pull request.
grails-data-hibernate5/grails-plugin/src/test/resources/application.yml Updated as part of this pull request.
grails-data-hibernate5/docs/src/docs/resources/index.html Updated as part of this pull request.
grails-data-hibernate5/docs/src/docs/asciidoc/testing/index.adoc Updated as part of this pull request.
grails-data-hibernate5/docs/src/docs/asciidoc/services/projectionQueries.adoc Updated as part of this pull request.
grails-data-hibernate5/docs/src/docs/asciidoc/learningMore.adoc Updated as part of this pull request.
grails-data-hibernate5/docs/src/docs/asciidoc/domainClasses/gormAssociation.adoc Updated as part of this pull request.
grails-data-hibernate5/docs/src/docs/asciidoc/constraints/index.adoc Updated as part of this pull request.
grails-data-hibernate5/docs/src/docs/asciidoc/advancedGORMFeatures.adoc Updated as part of this pull request.
grails-data-hibernate5/dbmigration/src/test/resources/logging.properties Updated as part of this pull request.
grails-data-hibernate5/dbmigration/src/test-cli/resources/logging.properties Updated as part of this pull request.
grails-data-hibernate5/dbmigration/src/main/resources/META-INF/services/liquibase.serializer.ChangeLogSerializer Updated as part of this pull request.
grails-data-hibernate5/dbmigration/src/main/resources/META-INF/services/liquibase.resource.PathHandler Updated as part of this pull request.
grails-data-hibernate5/dbmigration/src/main/resources/META-INF/services/liquibase.precondition.Precondition Updated as part of this pull request.
grails-data-hibernate5/dbmigration/src/main/resources/META-INF/services/liquibase.parser.ChangeLogParser Updated as part of this pull request.
grails-data-hibernate5/dbmigration/src/main/resources/META-INF/services/liquibase.database.Database Updated as part of this pull request.
grails-data-hibernate5/dbmigration/src/main/resources/META-INF/services/liquibase.command.CommandStep Updated as part of this pull request.
grails-data-hibernate5/dbmigration/src/main/resources/META-INF/services/liquibase.change.Change Updated as part of this pull request.
grails-data-hibernate5/dbmigration/src/main/groovy/org/grails/plugins/databasemigration/DatabaseMigrationException.groovy Updated as part of this pull request.
grails-data-hibernate5/dbmigration/src/integration-test/resources/changelog-transaction.groovy Updated as part of this pull request.
grails-data-hibernate5/dbmigration/src/integration-test/resources/changelog-account-sql.groovy Updated as part of this pull request.
grails-data-hibernate5/dbmigration/src/integration-test/resources/application-single-datasource.yml Updated as part of this pull request.
grails-data-hibernate5/dbmigration/grails-app/domain/testapp/Person.groovy Updated as part of this pull request.
grails-data-hibernate5/dbmigration/grails-app/domain/testapp/Account.groovy Updated as part of this pull request.
grails-data-hibernate5/dbmigration/grails-app/conf/application.yml Updated as part of this pull request.
grails-data-hibernate5/core/src/test/resources/simplelogger.properties Updated as part of this pull request.
grails-data-hibernate5/core/src/test/resources/META-INF/services/org.apache.grails.data.testing.tck.base.GrailsDataTckManager Updated as part of this pull request.
grails-data-hibernate5/core/src/test/groovy/grails/gorm/tests/entities/Player.groovy Updated as part of this pull request.
grails-data-hibernate5/core/src/test/groovy/grails/gorm/tests/autoimport/other/A.groovy Updated as part of this pull request.
grails-data-hibernate5/core/src/main/resources/META-INF/org.hibernate.integrator.spi.Integrator Updated as part of this pull request.
grails-data-hibernate5/core/src/main/groovy/org/grails/orm/hibernate/cfg/Settings.java Updated as part of this pull request.
grails-data-hibernate5/boot-plugin/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports Updated as part of this pull request.
grails-data-hibernate5/boot-plugin/src/main/resources/META-INF/services/org.grails.cli.compiler.CompilerAutoConfiguration Updated as part of this pull request.
grails-data-graphql/README.md Updated as part of this pull request.
grails-data-graphql/core/build.gradle Updated as part of this pull request.
grails-data-docs/guide-rx/src/main/docs/querying/whereQueries.adoc Updated as part of this pull request.
grails-data-docs/guide-rx/src/main/docs/querying/index.adoc Updated as part of this pull request.
grails-data-docs/guide-rx/src/main/docs/querying/dynamicFinders.adoc Updated as part of this pull request.
grails-data-docs/guide-rx/src/main/docs/gettingStarted/CRUD.adoc Updated as part of this pull request.
grails-data-docs/guide-developer/src/main/docs/gettingStarted.adoc Updated as part of this pull request.
grails-data-docs/data-mapping-website/src/main/resources/index.html Updated as part of this pull request.
grails-common/src/main/groovy/org/apache/grails/common/compiler/GroovyTransformOrder.groovy Updated as part of this pull request.
gradle/test-config.gradle Updated as part of this pull request.
gradle/spring-security-test-config.gradle Updated as part of this pull request.
gradle/redis-test-config.gradle Updated as part of this pull request.
gradle/rat-root-config.gradle Updated as part of this pull request.
gradle/publish-root-config.gradle Updated as part of this pull request.
gradle/mongodb-test-config.gradle Updated as part of this pull request.
gradle/mongodb-forked-test-config.gradle Updated as part of this pull request.
gradle/hibernate7-test-config.gradle Updated as part of this pull request.
gradle/grails-data-tck-config.gradle Updated as part of this pull request.
gradle/functional-test-config.gradle Updated as part of this pull request.
end-to-end/spring-dependency-management/grails-app/conf/application.yml Updated as part of this pull request.
end-to-end/spring-dependency-management/build.gradle Updated as part of this pull request.
end-to-end/legacy-commands/build.gradle Updated as part of this pull request.
DEVELOPMENT.md Updated as part of this pull request.
build-logic/plugins/src/test/groovy/org/apache/grails/buildsrc/GrailsDependencyValidatorPluginSpec.groovy Updated as part of this pull request.
build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/GrailsDependencyValidatorPlugin.groovy Updated as part of this pull request.
build-logic/docs-core/build.gradle Updated as part of this pull request.
.gitignore Updated as part of this pull request.
.github/workflows/sitemesh2.yml Updated as part of this pull request.
.agents/skills/gradle-developer/SKILL.md Updated as part of this pull request.
Review details

Suppressed comments (1)

grails-data-graphql/README.md:50

  • This README now advertises the multi-datastore example as Hibernate 7, but grails-data-graphql/docs/src/main/docs/guide/gettingStarted.adoc:22,87 still links to the removed grails-data/hibernate5 manual. Those current GraphQL documentation links will be broken after this removal; switch them to the Hibernate 7 manual.
  • Files reviewed: 122/1269 changed files
  • Comments generated: 15
  • Review effort level: Lite

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

dependencies {

implementation platform(project(':grails-bom'))
testImplementation platform(project(':grails-hibernate7-bom'))
@@ -41,6 +41,7 @@ ext {

dependencies {
implementation platform(project(':grails-bom'))
testImplementation platform(project(':grails-hibernate7-bom'))
@@ -23,14 +23,15 @@

public enum GormImpl {

HIBERNATE5("gorm-hibernate5", "Hibernate 5"),
HIBERNATE7("gorm-hibernate7", "Hibernate 7"),
@@ -47,15 +47,15 @@ dependencies {
} else {
implementation 'org.apache.grails:grails-sitemesh3'
}
implementation 'org.apache.grails:grails-data-hibernate5'
implementation 'org.apache.grails:grails-data-hibernate7'
@@ -48,7 +48,7 @@ dependencies {
} else {
implementation 'org.apache.grails:grails-sitemesh3'
}
implementation 'org.apache.grails:grails-data-hibernate5'
implementation 'org.apache.grails:grails-data-hibernate7'
@@ -33,6 +33,7 @@ group = 'org.apache.grails.testing'
dependencies {
implementation platform(project(':grails-bom'))
testImplementation platform(project(':grails-bom'))
testImplementation platform(project(':grails-hibernate7-bom'))
@@ -31,6 +31,7 @@ group = 'org.apache.grails.testing'

dependencies {
implementation platform(project(':grails-bom'))
testImplementation platform(project(':grails-hibernate7-bom'))
@@ -39,6 +39,7 @@ ext {

dependencies {
implementation platform(project(':grails-bom'))
testImplementation platform(project(':grails-hibernate7-bom'))
@@ -83,7 +83,7 @@ Provided Features:
* events - Adds support for the Grails EventBus abstraction
* geb2 - Adds Geb dependencies to run functional tests
* gsp - Adds support for GSP to the project
* hibernate5 - Adds GORM for Hibernate 5 to the project
* hibernate7 - Adds GORM for Hibernate 7 to the project
@@ -84,7 +84,7 @@ Grails 4.0 is built on Spring 5 and Spring Boot 2.1. See the https://github.com/

Grails 4.x supports a minimum version of Hibernate 5.4 and GORM 7.x. Several changes have been made to GORM to support the newer version of Hibernate and simplify GORM itself.

The details of these changes are covered in the link:{hibernate5Guide}index.html#upgradeNotes[GORM upgrade documentation].
The details of these changes are covered in the link:{hibernate7Guide}index.html#upgradeNotes[GORM upgrade documentation].
@codecov

codecov Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.9730%. Comparing base (51b663f) to head (9444cc7).
⚠️ Report is 356 commits behind head on 9.0.x-h7-improvement-phase3.

Additional details and impacted files

Impacted file tree graph

@@                          Coverage Diff                          @@
##             9.0.x-h7-improvement-phase3     #16350        +/-   ##
=====================================================================
+ Coverage                        61.0129%   61.9730%   +0.9602%     
+ Complexity                         26652      25684       -968     
=====================================================================
  Files                               2249       2192        -57     
  Lines                             111565     104873      -6692     
  Branches                           20208      18930      -1278     
=====================================================================
- Hits                               68069      64993      -3076     
+ Misses                             34509      31544      -2965     
+ Partials                            8987       8336       -651     

see 41 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jdaugherty

Copy link
Copy Markdown
Contributor

LGPL is allowed on optional features. I don't think we should remove this until we've proven that hibernate 7 works. We continue to find issues and have not released yet. I think this PR should be held on merge until we know hibernate 7 bug reports die down.

@jamesfredley

Copy link
Copy Markdown
Contributor

I think this could be considered for Grails 10, at the earliest. Maybe 11.

@jamesfredley
jamesfredley marked this pull request as draft October 3, 2026 17:56
borinquenkid and others added 9 commits October 10, 2026 14:22
Brings the branch up to date with origin/9.0.x (1561 commits). The
branch only removes Hibernate 5, so upstream's side is taken wherever
the two overlap and the removal is re-applied on top.

Conflicts: 63 in total.

46 modify/delete (upstream changed a Hibernate 5 file this branch
deletes): all resolved by keeping the file deleted. These were
grails-data-hibernate5 core (24), docs (11), grails-plugin (3),
dbmigration (3), boot-plugin (2) and others, plus
gradle/hibernate5-test-config.gradle, grails-bom/hibernate5/build.gradle
and grails-test-examples/hibernate5/spring-boot-hibernate/build.gradle.
Twenty files upstream added under grails-data-hibernate5 (new specs and
dbmigration listeners) merged cleanly and were deleted as well, since the
module is gone. Nothing needed porting: the shared files those upstream
commits touched merged cleanly.

17 content conflicts, each resolved by taking upstream and re-applying
this branch's removal:
- .github/workflows/gradle.yml: dropped the hibernate5Functional job
  that upstream changed (timeout, pinned actions)
- build-logic/docs-core/build.gradle: dropped 'onlyHibernate5Tests'
- GrailsDependencyValidatorPlugin.groovy: dropped 'grails-hibernate5-bom'
  from BOM_PROJECT_NAMES, kept upstream's SKIP_PROPERTY
- dependencies.gradle: upstream's versions kept; dropped the
  hibernate5/liquibase-hibernate5 customBomVersions block
- gradle/{hibernate7,mongodb-forked,mongodb,redis,spring-security}-test-config.gradle,
  gradle/test-config.gradle, grails-gradle/gradle/test-config.gradle:
  dropped 'onlyHibernate5Tests'
- grails-doc/build.gradle: Hibernate 5 BOM page, BOM and jar dependencies
  and doc attributes removed or switched to Hibernate 7
- grails-doc/src/en/ref/Dependency Versions.adoc: Hibernate 5 BOM row and
  liquibase-hibernate5 sentence removed, upstream's Hibernate 7 text kept
- grails-doc/src/en/ref/Domain Classes/lock.adoc: upstream's new locking
  text kept, Hibernate 5 behaviour and guide link removed
- grails-fields/build.gradle: Hibernate 7 test dependency plus upstream's
  grails-rest-transforms
- GrailsGradlePlugin.groovy: dropped the hibernate5 BOM names, kept
  upstream's lazy BOM handling
- grails-gsp/spring-boot/README.md: upstream's text, hibernate5 link
  not carried over

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…t merge

- grails-test-examples openapi and openapi-rest-api use grails-data-hibernate7
  and the Hibernate 7 BOM
- grails-data-mongodb docs no longer include the removed
  grails-test-examples-mongodb-hibernate5 project
- generated forge/cli metadata in the geb, geb-context-path, gsp-layout and
  gsp-sitemesh3 test examples selects gorm-hibernate7
- TCK ValidationSpec, MongodbGrailsPluginSpec and DynamicFinder no longer
  mention the hibernate5 suite property, plugin name or module
- .gitignore and the RAT excludes drop the Hibernate 5 BOM pages
- docs: command line guide and reference, whatsNew, locking, refresh,
  joinTable, event and Hibernate version pages describe Hibernate 7 only

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…m the test examples

hibernate-ehcache, hibernate-core-jakarta and the javax transaction API they
needed were only managed by the Hibernate 5 BOM variant, which no longer
exists, so the examples that still declared them (all on the Hibernate 7 BOM
already) failed to resolve. They are Hibernate 5 artifacts and have no use
under Hibernate 7.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… Hibernate 7

Modules that tested against Hibernate 7 declared grails-bom for their main
dependencies and grails-hibernate7-bom for their tests, which the dependency
validator rejects as more than one Grails BOM. With Hibernate 5 gone the
default BOM no longer has a Hibernate variant to pair with, and
grails-hibernate7-bom inherits it, so these modules now use only
grails-hibernate7-bom.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The GraphQL test domains map Byte[] and Character[] properties. Hibernate 5 treated
them like byte[] and char[]; Hibernate 7 rejects the wrapper arrays unless
hibernate.type.wrapper_array_handling is allow, which failed the session factory of
the GraphQL specs and of the grails-test-app functional app now that they run on
Hibernate 7.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…own second pass

An entity that is also embedded in another is bound twice, once as a component and once
as an entity, and its hasMany property is bound with a different Hibernate collection
each time. The property only remembers the last collection, and the second passes bound
property.getCollection(), so the collection of the first binding never got its element
and key and the session factory failed with 'Collection key not bound'. Each second pass
now keeps the collection it was created for and restores it on the property before
binding.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
An untyped Map property has no element type, and Hibernate 7 cannot choose a column type
for its java.lang.Object elements, so the docs app failed to start now that it runs on
Hibernate 7. Declaring it as Map<String, String> gives the element a type.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
CommentIntegrationSpec, TagIntegrationSpec and UserRoleIntegrationSpec matched the SQL text
of Hibernate 5 (this_ aliases, a trailing limit, inner join). Hibernate 7 generates the same
queries with c1_0 style aliases, no limit for a lookup by id, and a left join for a to-one
association, so the patterns follow that. The queries and their count are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Upstream is the base; the Hibernate 5 removal is re-applied on top of it
(forge Groovy features, workflows, SBOM exceptions, grails-doc build and CLI docs).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@borinquenkid
borinquenkid changed the base branch from 9.0.x to 10.0.x October 16, 2026 05:12
@testlens-app

This comment has been minimized.

@matrei matrei left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this PR can be closed. This is not going to happen any time soon and will only cause maintenance work to keep current.

@borinquenkid

Copy link
Copy Markdown
Member Author

I think this PR can be closed. This is not going to happen any time soon and will only cause maintenance work to keep current.

I have moved this to H10

…o sync10/9.0.x-remove-h5

# Conflicts:
#	grails-data-hibernate5/core/build.gradle
#	grails-data-hibernate5/core/src/main/groovy/org/grails/orm/hibernate/proxy/ByteBuddyGroovyInterceptor.java
#	grails-data-hibernate5/core/src/main/groovy/org/grails/orm/hibernate/proxy/ByteBuddyGroovyProxyFactory.java
#	grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/NullValueEqualSpec.groovy
#	grails-forge/grails-forge-core/src/main/groovy/org/grails/forge/feature/database/GrailsDataHibernate5.groovy
#	grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/GrailsDataHibernate5Spec.groovy
#	grails-test-examples/hibernate5/grails-hibernate-groovy-proxy/build.gradle
#	grails-test-examples/hibernate5/grails-hibernate-groovy-proxy/grails-app/conf/application.yml
#	grails-test-examples/hibernate5/grails-hibernate/build.gradle
#	grails-test-examples/hibernate5/grails-hibernate/grails-app/conf/application.yml
@borinquenkid
borinquenkid changed the base branch from 10.0.x to 9.0.x-h7-improvement-phase3 October 20, 2026 02:32
@borinquenkid
borinquenkid marked this pull request as ready for review October 20, 2026 02:33
@borinquenkid

Copy link
Copy Markdown
Member Author

BLOCKER before merge: this branch carries a temporary CI commit.

This PR is stacked, and to avoid starting a full CI matrix on every push or rebase of the stack it carries one temporary commit, CHANGEME FOR ACCEPTANCE: disable PR workflow triggers. It changes the pull_request: trigger of 13 workflows to branches: ['CHANGEME-FOR-ACCEPTANCE'], a branch that does not exist, so pushing, rebasing or force-pushing this branch starts no jobs.

Condition for merging this PR: that commit must be reverted on this branch first, and CI must then run and be green. The absence of CI checks on this PR is deliberate and does not mean the code was tested. The full build runs on #16576 and #16572, the PRs that target 10.0.x.

# Conflicts:
#	.github/workflows/gradle.yml
#	grails-data-hibernate5/core/src/main/groovy/org/grails/orm/hibernate/AbstractHibernateDatastore.java
#	grails-data-hibernate5/core/src/main/groovy/org/grails/orm/hibernate/AbstractHibernateGormStaticApi.groovy
#	grails-data-hibernate5/core/src/main/groovy/org/grails/orm/hibernate/HibernateDatastore.java
#	grails-data-hibernate5/core/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
#	grails-data-hibernate5/core/src/main/groovy/org/grails/orm/hibernate/multitenancy/MultiTenantEventListener.java
#	grails-data-hibernate5/core/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java
#	grails-data-hibernate5/docs/src/docs/asciidoc/multiTenancy/discriminatorMultiTenancy.adoc
@borinquenkid

Copy link
Copy Markdown
Member Author

Closing: the project keeps Hibernate 5 support through Grails 10 and removes it in Grails 11, so this removal is premature. The branch stays for when that time comes.

borinquenkid added a commit that referenced this pull request Oct 22, 2026
… partial

The stage-2 conversion of grails-data-hibernate7 kept semicolons, double
quotes and Java idioms to preserve rename similarity against the original
.java. This pass makes 51 of those files read as Groovy: no semicolons,
single-quoted plain strings, property access, Groovy truth where a Groovy
File is not involved, and no `.class` on class references. No behaviour
change: the module's suite is the safety net.

Rebuilt on 9.0.x-h7-improvement-phase3 after the Hibernate 5 removal was
withdrawn (#16350 is closed: Hibernate 5 stays through Grails 10), so the
branch no longer carries the removal commits. It carries the 2026-10-22
upstream ports (tenant filter on every to-many, count-only queries without
orders, enum unique groups over every member column) as merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants