From 1f0e0566ff3e7eceedc991f99d0432a5c8c39705 Mon Sep 17 00:00:00 2001 From: Gavin King Date: Thu, 23 Jan 2025 20:47:40 +0100 Subject: [PATCH] minor improvement to javadoc for @OptimisticLock --- .../org/hibernate/annotations/OptimisticLock.java | 13 +++++++------ .../hibernate/annotations/OptimisticLocking.java | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/OptimisticLock.java b/hibernate-core/src/main/java/org/hibernate/annotations/OptimisticLock.java index aa2526939fc3..d743783eaf7f 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/OptimisticLock.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/OptimisticLock.java @@ -11,13 +11,14 @@ /** * Specifies whether mutating the annotated attribute should trigger an increment - * to the {@link jakarta.persistence.Version version} of the entity instance. Or, - * if {@link OptimisticLockType#ALL} or {@link OptimisticLockType#DIRTY} are used, - * specifies whether the attribute should be included or excluded from the list of - * checked attributes. + * to the {@linkplain jakarta.persistence.Version version} of the entity instance. + * Or, when {@link OptimisticLockType#ALL @OptimisticLocking(type = ALL)} or + * {@link OptimisticLockType#DIRTY @OptimisticLocking(type = DIRTY)} is used, + * specifies whether the annotated attribute should be included or excluded from + * the list of checked attributes. *

- * If this annotation is not present, mutating an attribute does cause the - * version to be incremented. + * If this annotation is not present, mutating an attribute does cause + * the version to be incremented. * * @author Logi Ragnarsson */ diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/OptimisticLocking.java b/hibernate-core/src/main/java/org/hibernate/annotations/OptimisticLocking.java index 25a48c193401..bdf0a02d6186 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/OptimisticLocking.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/OptimisticLocking.java @@ -45,6 +45,7 @@ * * @see org.hibernate.LockMode * @see jakarta.persistence.LockModeType + * @see OptimisticLock */ @Target( TYPE ) @Retention( RUNTIME )