Java Reference
In-Depth Information
Annotation
Description
Annotation Elements
@JoinColumn
Specifies a mapped column
for joining an association.
name (optional): The name
of the foreign key column.
If the join is for OneToOne
or ManyToOne, the foreign
key column is in the source
entity. If the join is for a
ManyToMany, the foreign
key is in the join table.
referencedColumnName
(optional): The name of the
column referenced by the
foreign key column.
unique (optional): Specifies
if the property is a unique
key. Default value is false.
nullable (optional):
Specifies if the foreign key
column is nullable. Default
value is true.
insertable (optional):
Specifies if the column is
included in the SQL INSERT
statements generated by the
persistence provider. Default
is true.
updatable (optional):
Specifies if the column is
included in the SQL UPDATE
statements generated by the
persistence provider. Default
is true.
columnDefinition
(optional): The SQL
fragment used to generate
the DDL for the column.
table (optional): The name
of the table that contains
the column. Default is
the primary table of the
applicable entity.
Search WWH ::




Custom Search