From dca844dd6f599323ec2f69d770c935dc4fa9fdaa Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 23 Mar 2021 09:43:12 +0100 Subject: [PATCH] Document effect of using AccessType(PROPERTY) in combination with Persistable. Closes #2338 Original pull request #2339 --- .../java/org/springframework/data/domain/Persistable.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/org/springframework/data/domain/Persistable.java b/src/main/java/org/springframework/data/domain/Persistable.java index 8a89fdbda..a08419662 100644 --- a/src/main/java/org/springframework/data/domain/Persistable.java +++ b/src/main/java/org/springframework/data/domain/Persistable.java @@ -19,10 +19,16 @@ import org.springframework.lang.Nullable; /** * Simple interface for entities. + *

+ * Note that methods declared in this interface ({@link #getId()} and {@link #isNew()}) become property accessors when + * implementing this interface in combination with + * {@link org.springframework.data.annotation.AccessType @AccessType(PROPERTY)}. Either of these can be marked as + * transient when annotated with {@link org.springframework.data.annotation.Transient @Transient}. * * @param the type of the identifier * @author Oliver Gierke * @author Christoph Strobl + * @author Mark Paluch */ public interface Persistable {