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 0f4503b1dda692366b8acc971669a00464836a83 Author: Walter Duque de Estrada <[email protected]> AuthorDate: Thu Jun 18 18:05:31 2026 -0500 Improve Javadoc for BackticksRemover; align cascade=CascadeType.PERSIST in upgrade docs BackticksRemover: expand single-line Javadoc to describe purpose and add @since 8.0. upgrading80x.adoc: use CascadeType.PERSIST (full qualified form) for consistency with surrounding text on the same page. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> --- .../orm/hibernate/cfg/domainbinding/util/BackticksRemover.java | 8 +++++++- grails-doc/src/en/guide/upgrading/upgrading80x.adoc | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/util/BackticksRemover.java b/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/util/BackticksRemover.java index 1313e285dc..72dee20ed9 100644 --- a/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/util/BackticksRemover.java +++ b/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/util/BackticksRemover.java @@ -21,7 +21,13 @@ package org.grails.orm.hibernate.cfg.domainbinding.util; import java.util.Optional; import java.util.function.Function; -/** Removes matching leading and trailing backticks from mapping names. */ +/** + * Removes matching leading and trailing backticks from mapping names. + * Used to strip the Groovy backtick-quoting convention from property and column names + * before passing them to the Hibernate mapping layer. + * + * @since 8.0 + */ public class BackticksRemover implements Function<String, String> { public static final String BACKTICK = "`"; diff --git a/grails-doc/src/en/guide/upgrading/upgrading80x.adoc b/grails-doc/src/en/guide/upgrading/upgrading80x.adoc index 2bb92473b3..89be2beb31 100644 --- a/grails-doc/src/en/guide/upgrading/upgrading80x.adoc +++ b/grails-doc/src/en/guide/upgrading/upgrading80x.adoc @@ -1094,7 +1094,7 @@ Persisting a transient entity that has detached associations now throws `EntityE If your domain mapping or annotated classes used `cascade = CascadeType.SAVE_UPDATE`, replace it with `cascade = CascadeType.ALL` or `cascade = [CascadeType.PERSIST, CascadeType.MERGE]` as appropriate. -Also note that automatic `cascade = PERSIST` on `@Id` and `@MapsId` associations was removed. +Also note that automatic `cascade = CascadeType.PERSIST` on `@Id` and `@MapsId` associations was removed. If you relied on this implicit behaviour, add an explicit `cascade = CascadeType.PERSIST` to the `@ManyToOne` or `@OneToOne` carrying `@MapsId`. ===== 26.4 Detached Entity Operations
