Package org.hibernate.annotations
Annotation Type Table
Complementary information to a table either primary or secondary
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptiondefine a table commentIf set to JOIN, the default, Hibernate will use an inner join to retrieve a secondary table defined by a class or its superclasses and an outer join for a secondary table defined by a subclass.Defines the Foreign Key name of a secondary table pointing back to the primary tableIndex[]IndexesbooleanIf true, Hibernate will not try to insert or update the properties defined by this join.booleanIf enabled, Hibernate will insert a row only if the properties defined by this join are non-null and will always use an outer join to retrieve the properties.Defines a custom SQL delete statement Only applies to secondary tablesDefines a custom SQL insert statement Only applies to secondary tablesDefines a custom SQL update statement Only applies to secondary tables
-
Element Details
-
appliesTo
String appliesToname of the targeted table -
indexes
Index[] indexesIndexes- Default:
{}
-
comment
String commentdefine a table comment- Default:
""
-
foreignKey
ForeignKey foreignKeyDefines the Foreign Key name of a secondary table pointing back to the primary table- Default:
@org.hibernate.annotations.ForeignKey(name="")
-
fetch
FetchMode fetchIf set to JOIN, the default, Hibernate will use an inner join to retrieve a secondary table defined by a class or its superclasses and an outer join for a secondary table defined by a subclass. If set to select then Hibernate will use a sequential select for a secondary table defined on a subclass, which will be issued only if a row turns out to represent an instance of the subclass. Inner joins will still be used to retrieve a secondary defined by the class and its superclasses. Only applies to secondary tables- Default:
JOIN
-
inverse
boolean inverseIf true, Hibernate will not try to insert or update the properties defined by this join. Only applies to secondary tables- Default:
false
-
optional
boolean optionalIf enabled, Hibernate will insert a row only if the properties defined by this join are non-null and will always use an outer join to retrieve the properties. Only applies to secondary tables- Default:
true
-
sqlInsert
SQLInsert sqlInsertDefines a custom SQL insert statement Only applies to secondary tables- Default:
@org.hibernate.annotations.SQLInsert(sql="")
-
sqlUpdate
SQLUpdate sqlUpdateDefines a custom SQL update statement Only applies to secondary tables- Default:
@org.hibernate.annotations.SQLUpdate(sql="")
-
sqlDelete
SQLDelete sqlDeleteDefines a custom SQL delete statement Only applies to secondary tables- Default:
@org.hibernate.annotations.SQLDelete(sql="")
-