diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/ColumnDefault.java b/hibernate-core/src/main/java/org/hibernate/annotations/ColumnDefault.java index be2f030f2de9..0e91414e88c7 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/ColumnDefault.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/ColumnDefault.java @@ -22,11 +22,19 @@ * the defaulted value of a database column. * *

+ * For example, this field will be populated with the value {@code "new"} by + * the database when the entity is inserted: + *

+ * @Generated @ColumnDefault(value = "'new'")
+ * private String status;
+ * 
+ *

* If {@code @Generated} is not used, a {@code default} value can cause state * held in memory to lose synchronization with the database. * * @author Steve Ebersole * + * @see Generated * @see GeneratedColumn * @see DialectOverride.ColumnDefault */ diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/Formula.java b/hibernate-core/src/main/java/org/hibernate/annotations/Formula.java index 3ee1ab2eb9f2..7e70d72cf66c 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/Formula.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/Formula.java @@ -45,14 +45,16 @@ * a formula may involve columns of the primary table, or columns of any one of the * secondary tables. But it may not involve columns of more than one table. *

- * The {@link ColumnTransformer} annotation is an alternative in certain cases, allowing - * the use of native SQL to read and write values to a column. + * The {@link ColumnTransformer @ColumnTransformer} annotation is an alternative in + * certain cases, allowing the use of native SQL to read and write values to + * a column. *

  * // it might be better to use @ColumnTransformer in this case
  * @Formula("decrypt(credit_card_num)")
  * String getCreditCardNumber() { ... }
  * 
* + * @see Generated * @see ColumnTransformer * @see DiscriminatorFormula * @see JoinFormula diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/Generated.java b/hibernate-core/src/main/java/org/hibernate/annotations/Generated.java index 0afd8eed74b5..677ee698b413 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/Generated.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/Generated.java @@ -42,7 +42,8 @@ * *

* On the other hand: