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/10/08 19:20:12 UTC
(grails-core) 03/16: docs: add native binding and mapping fixes to the Hibernate 7 migration checklist
This is an automated email from the ASF dual-hosted git repository.
borinquenkid pushed a commit to branch 9.0.x-h7-improvement-phase3
in repository https://gitbox.apache.org/repos/asf/grails-core.git
commit 536dfadd30ae332f2f8713d0ce387813d348827d
Author: Walter Duque de Estrada <wb...@mac.com>
AuthorDate: Wed Oct 7 19:11:36 2026 -0500
docs: add native binding and mapping fixes to the Hibernate 7 migration checklist
Users migrating to Grails 9 on Hibernate 7 find their action items in the
checklist, so the mapping fixes and the opt-in native binding point to the
new manual page.
Co-Authored-By: Claude Sonnet 5.5 <no...@anthropic.com>
---
.../docs/src/docs/asciidoc/gettingStarted/hibernateVersions.adoc | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/grails-data-hibernate7/docs/src/docs/asciidoc/gettingStarted/hibernateVersions.adoc b/grails-data-hibernate7/docs/src/docs/asciidoc/gettingStarted/hibernateVersions.adoc
index 15bd28e7c7..101f5eac78 100644
--- a/grails-data-hibernate7/docs/src/docs/asciidoc/gettingStarted/hibernateVersions.adoc
+++ b/grails-data-hibernate7/docs/src/docs/asciidoc/gettingStarted/hibernateVersions.adoc
@@ -109,6 +109,14 @@ If you are migrating an application from Hibernate 5 or the Grails Hibernate 5 p
| Grails 9 refuses to start when a bidirectional many-to-many has no `belongsTo` on either side. Earlier versions bound both sides as inverse, so no join table row was ever written and the relationship was silently lost.
| Declare `belongsTo` on the side that should be owned, for example `static belongsTo = Author` in `Book`. For a many-to-many from a class to itself, `belongsTo` names the class itself. The startup error names both sides of each affected relationship. See <<gormAssociation-manyToMany,Many-to-Many Associations>>.
+| Mapping fixes on classic binding
+| `insertable: false` and `updatable: false` are honored, enum columns receive the `comment`, `defaultValue`, `read` and `write` of their column mapping, the elements of basic-value collections of an owner with several unidirectional collections are stored, and the inverse side of a many-to-many reads the join table that its owner writes.
+| Review domain classes that use `insertable: false` or `updatable: false`, because values that used to be written are no longer written. Compare the generated schema of enum properties with your database before using `dbCreate=update`. See <<nativeDomainBinding,Native Domain Binding>> for the related schema differences.
+
+| Native domain binding (opt-in)
+| `hibernate.generatedDomainClasses: true` makes Hibernate's own annotation binder bind the domain classes. It is off by default and is intended to become the default. A few mapping options are refused at startup and the generated schema differs from classic binding in documented cases.
+| Before enabling it, fix the mappings listed in <<nativeDomainBinding-refused,Mappings Native Binding Refuses>> and run `dbm-gorm-diff` against a copy of the existing database. See <<nativeDomainBinding-schema,Differences in the Schema>>.
+
| Query locks and query cache
| Locked queries are not query-cacheable.
| Do not expect `lock: true` queries to use the query cache. Treat pessimistically locked queries as database reads that require fresh row state.