diff --git a/src/main/java/com/avaje/ebean/annotation/CreatedTimestamp.java b/src/main/java/com/avaje/ebean/annotation/CreatedTimestamp.java index b1c46bfe9..49b5bc6a1 100644 --- a/src/main/java/com/avaje/ebean/annotation/CreatedTimestamp.java +++ b/src/main/java/com/avaje/ebean/annotation/CreatedTimestamp.java @@ -9,6 +9,10 @@ import java.lang.annotation.Target; * For a timestamp property that is set to the datetime when the entity is * created/inserted. *
+ * This is effectively an alias for @WhenCreated which was added as it hints + * towards a better naming convention (WhenCreated, WhenModified). + *
+ ** An alternative to using this annotation would be to use insertable=false, * updateable=false with @Column and have the DB insert the current time * (default value on the DB column is SYSTIME etc). diff --git a/src/main/java/com/avaje/ebean/annotation/UpdatedTimestamp.java b/src/main/java/com/avaje/ebean/annotation/UpdatedTimestamp.java index 21118848b..b93a5ab37 100644 --- a/src/main/java/com/avaje/ebean/annotation/UpdatedTimestamp.java +++ b/src/main/java/com/avaje/ebean/annotation/UpdatedTimestamp.java @@ -8,6 +8,10 @@ import java.lang.annotation.Target; /** * For a timestamp property that is set to the datetime when the entity was last * updated. + *
+ * This is effectively an alias for @WhenModified which was added as it hints + * towards a better naming convention (WhenCreated, WhenModified). + *
*/ @Target({ ElementType.FIELD, ElementType.METHOD }) @Retention(RetentionPolicy.RUNTIME) diff --git a/src/main/java/com/avaje/ebean/annotation/WhenModified.java b/src/main/java/com/avaje/ebean/annotation/WhenModified.java index 0c4719183..1dbfd674e 100644 --- a/src/main/java/com/avaje/ebean/annotation/WhenModified.java +++ b/src/main/java/com/avaje/ebean/annotation/WhenModified.java @@ -11,7 +11,6 @@ import java.lang.annotation.Target; * This is effectively an alias for @UpdatedTimestamp and added to hint * towards a better naming convention (WhenCreated, WhenModified). * - * */ @Target({ ElementType.FIELD, ElementType.METHOD }) @Retention(RetentionPolicy.RUNTIME)