From 86840955659ce5d838018cb16450fe53402b8325 Mon Sep 17 00:00:00 2001 From: Gavin King Date: Fri, 17 May 2024 00:33:00 +0200 Subject: [PATCH] HHH-18129 add to migration guide Signed-off-by: Gavin King --- migration-guide.adoc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/migration-guide.adoc b/migration-guide.adoc index 1ad761469d..f0f29663e1 100644 --- a/migration-guide.adoc +++ b/migration-guide.adoc @@ -106,6 +106,15 @@ class Book { ---- +[[auto-cascade-persist]] +== Cascading persistence for `@Id` and `@MapsId` fields + +Previously Hibernate automatically enabled `cascade=PERSIST` for association fields annotated `@Id` or `@MapsId`. +This was undocumented and unexpected behavior, and arguably against the intent of the Persistence specification. + +Existing code which relies on this behavior should be modified by addition of explicit `cascade=PERSIST` to the association field. + + [[enum-checks]] == Enums and Check Constraints