From 144e34e24922676954bae4aff1655d388dfc7bc3 Mon Sep 17 00:00:00 2001 From: Vlad Mihalcea Date: Thu, 3 Nov 2016 14:28:57 +0200 Subject: [PATCH] HHH-2705 - optimistic-lock = "dirty" does not support detached objects --- .../src/main/asciidoc/userguide/appendices/Annotations.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/documentation/src/main/asciidoc/userguide/appendices/Annotations.adoc b/documentation/src/main/asciidoc/userguide/appendices/Annotations.adoc index 1af7a176b3..51a8736473 100644 --- a/documentation/src/main/asciidoc/userguide/appendices/Annotations.adoc +++ b/documentation/src/main/asciidoc/userguide/appendices/Annotations.adoc @@ -1008,6 +1008,8 @@ NONE:: The implicit optimistic locking mechanism is disabled. VERSION:: The implicit optimistic locking mechanism is using a dedicated version column. ALL:: The implicit optimistic locking mechanism is using *all* attributes as part of an expanded WHERE clause restriction for the `UPDATE` and `DELETE` SQL statements. DIRTY:: The implicit optimistic locking mechanism is using the *dirty* attributes (the attributes that were modified) as part of an expanded WHERE clause restriction for the `UPDATE` and `DELETE` SQL statements. ++ +When using `DIRTY`, you should also add the <> annotation and also <> so that detached entities are properly handled as well. [[annotations-hibernate-orderby]] ==== `@OrderBy`