add example to @Comment
This commit is contained in:
parent
1657c22aca
commit
117851e4a4
|
@ -28,6 +28,21 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||||
* <p>
|
* <p>
|
||||||
* But when {@link #on} is explicitly specified, the comment applies to the mapped table
|
* But when {@link #on} is explicitly specified, the comment applies to the mapped table
|
||||||
* or column with the specified name.
|
* or column with the specified name.
|
||||||
|
* <p>
|
||||||
|
* For example:
|
||||||
|
* <pre>
|
||||||
|
* @Entity
|
||||||
|
* @Table(name = "book")
|
||||||
|
* @SecondaryTable(name = "edition")
|
||||||
|
* @Comment("The primary table for Book")
|
||||||
|
* @Comment(on = "edition",
|
||||||
|
* value = "The secondary table for Book")
|
||||||
|
* class Book { ... }
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @apiNote In principle, it's possible for a column of a secondary table to have the
|
||||||
|
* same name as a column of the primary table, or as a column of some other
|
||||||
|
* secondary table. Therefore, {@link #on} may be ambiguous.
|
||||||
*
|
*
|
||||||
* @author Yanming Zhou
|
* @author Yanming Zhou
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,7 +18,7 @@ import java.lang.annotation.Annotation;
|
||||||
* <p>
|
* <p>
|
||||||
* An implementation of this interface interacts directly with model objects
|
* An implementation of this interface interacts directly with model objects
|
||||||
* like {@link PersistentClass} and {@link Property} to implement the
|
* like {@link PersistentClass} and {@link Property} to implement the
|
||||||
* semantics of some {@link org.hibernate.annotations.AttributeBinderType
|
* semantics of some {@linkplain org.hibernate.annotations.AttributeBinderType
|
||||||
* custom mapping annotation}.
|
* custom mapping annotation}.
|
||||||
*
|
*
|
||||||
* @see org.hibernate.annotations.AttributeBinderType
|
* @see org.hibernate.annotations.AttributeBinderType
|
||||||
|
|
|
@ -18,7 +18,7 @@ import java.lang.annotation.Annotation;
|
||||||
* <p>
|
* <p>
|
||||||
* An implementation of this interface interacts directly with model objects
|
* An implementation of this interface interacts directly with model objects
|
||||||
* like {@link PersistentClass} and {@link Component} to implement the
|
* like {@link PersistentClass} and {@link Component} to implement the
|
||||||
* semantics of some {@link org.hibernate.annotations.TypeBinderType
|
* semantics of some {@linkplain org.hibernate.annotations.TypeBinderType
|
||||||
* custom mapping annotation}.
|
* custom mapping annotation}.
|
||||||
*
|
*
|
||||||
* @see org.hibernate.annotations.TypeBinderType
|
* @see org.hibernate.annotations.TypeBinderType
|
||||||
|
|
Loading…
Reference in New Issue