From 3c2db8f78d062395b437056bf80560d9235272d6 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Thu, 26 Oct 2023 10:37:37 -0500 Subject: [PATCH] HHH-17164 - Proper, first-class soft-delete support HHH-17311 - Reversed soft delete support https://hibernate.atlassian.net/browse/HHH-17164 https://hibernate.atlassian.net/browse/HHH-17311 --- .../chapters/domain/soft_delete.adoc | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/documentation/src/main/asciidoc/userguide/chapters/domain/soft_delete.adoc b/documentation/src/main/asciidoc/userguide/chapters/domain/soft_delete.adoc index fb028f72de..2ea421a8ae 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/domain/soft_delete.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/domain/soft_delete.adoc @@ -21,9 +21,24 @@ Hibernate supports soft delete for both <> and <> which contains the indicator. -2. A <> from `Boolean` indicator value to the proper database type -3. A <> for interpreting the stored indicator values. +1. A <> for interpreting the stored indicator values. +2. The <> which contains the indicator. +3. A <> from `Boolean` indicator value to the proper database type + + +[[soft-delete-type]] +==== Strategy - SoftDeleteType + +Given truth values, there are 2 valid ways to interpret the values stored in the database. This +interpretation is defined by the SoftDeleteType enumeration and can be configured per-usage using +`@SoftDelete(..., strategy=ACTIVE)` or `@SoftDelete(..., strategy=DELETED)` - + +ACTIVE:: +Tracks rows which are active. A `true` value in the database indicates that the row is active +(non-deleted); a `false` value indicates inactive (deleted). +DELETED:: +Tracks rows which are deleted. A `true` value in the database indicates that the row is deleted; +a `false` value indicates that the row is non-deleted. [[soft-delete-column]] @@ -139,17 +154,3 @@ The `@SoftDelete` annotation may also be placed at the package level, in which c entities and collections defined within the package. -[[soft-delete-type]] -==== Strategy - SoftDeleteType - -Given truth values, there are 2 valid ways to interpret the values stored in the database. This -interpretation is defined by the SoftDeleteType enumeration and can be configured per-usage using -`@SoftDelete(..., strategy=ACTIVE)` or `@SoftDelete(..., strategy=DELETED)` - - -ACTIVE:: - Tracks rows which are active. A `true` value in the database indicates that the row is active - (non-deleted); a `false` value indicates inactive (deleted). -DELETED:: - Tracks rows which are deleted. A `true` value in the database indicates that the row is deleted; - a `false` value indicates that the row is non-deleted. -