Package org.hibernate.annotations
Annotation Type Table
-
@Target(TYPE) @Retention(RUNTIME) @Repeatable(Tables.class) public @interface Table
Complementary information for a table declared using theTable
, orSecondaryTable
annotation. Usually used only for secondary tables.- See Also:
Table
,SecondaryTable
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String
checkConstraint
A check constraint, written in native SQL.String
comment
Specifies comment to add to the generated DDL for the table.FetchMode
fetch
Deprecated.This setting has no effect in Hibernate 6ForeignKey
foreignKey
Deprecated.useSecondaryTable.foreignKey()
Index[]
indexes
Deprecated.useTable.indexes()
orSecondaryTable.indexes()
boolean
inverse
Deprecated.boolean
optional
Deprecated.SQLDelete
sqlDelete
Deprecated.useSQLInsert.table()
to specify the secondary tableSQLInsert
sqlInsert
Deprecated.useSQLInsert.table()
to specify the secondary tableSQLUpdate
sqlUpdate
Deprecated.useSQLInsert.table()
to specify the secondary table
-
-
-
Element Detail
-
appliesTo
String appliesTo
The name of the targeted table.
-
-
-
indexes
@Deprecated(since="6.0") Index[] indexes
Deprecated.useTable.indexes()
orSecondaryTable.indexes()
Indexes.- Default:
- {}
-
-
-
foreignKey
@Deprecated(since="6.0") ForeignKey foreignKey
Deprecated.useSecondaryTable.foreignKey()
Specifies a foreign key of a secondary table, which points back to the primary table.- Default:
- @org.hibernate.annotations.ForeignKey(name="")
-
-
-
fetch
@Deprecated(since="6.2") FetchMode fetch
Deprecated.This setting has no effect in Hibernate 6- Default:
- org.hibernate.annotations.FetchMode.JOIN
-
-
-
inverse
@Deprecated(since="6.2") boolean inverse
Deprecated.If enabled, Hibernate will never insert or update the columns of the secondary table.Only applies to secondary tables.
- Default:
- false
-
-
-
optional
@Deprecated(since="6.2") boolean optional
Deprecated.If enabled, Hibernate will insert a row only if the columns of the secondary table would not all be null, and will always use an outer join to read the columns. Thus, by default, Hibernate avoids creating a row of null values.- Default:
- true
-
-
-
sqlInsert
@Deprecated(since="6.2") SQLInsert sqlInsert
Deprecated.useSQLInsert.table()
to specify the secondary tableDefines a custom SQL insert statement.Only applies to secondary tables.
- Default:
- @org.hibernate.annotations.SQLInsert(sql="")
-
-
-
sqlUpdate
@Deprecated(since="6.2") SQLUpdate sqlUpdate
Deprecated.useSQLInsert.table()
to specify the secondary tableDefines a custom SQL update statement.Only applies to secondary tables.
- Default:
- @org.hibernate.annotations.SQLUpdate(sql="")
-
-
-
sqlDelete
@Deprecated(since="6.2") SQLDelete sqlDelete
Deprecated.useSQLInsert.table()
to specify the secondary tableDefines a custom SQL delete statement.Only applies to secondary tables.
- Default:
- @org.hibernate.annotations.SQLDelete(sql="")
-
-