| Modifier and Type | Optional Element and Description |
|---|---|
String |
comment
字段注释信息
Specified the comment
|
String |
defaultValue
定义默认值。如果默认值为空,则默认值去数据类型中定义的默认值。
Specified the default value to this column.
|
String |
length
定义字段长度,内容和SQL DDL中的长度定义一样
Specifies the SQL DDL length expression
|
boolean |
notNull
定义字段是否可为空
Specifies whether the NULL value be allowed on this column
|
String |
referenceField
当一个@Table对象引用另一个@Table对象时,我们可以通过这个字段指定外键引用。
Specifies the reference field when a column field is referenced to an EntityBean.
|
DataType |
type
数据类型
The data type of database
|
boolean |
unsigned
如果是数字,定义是否是无符号数据类型
Specifies whether the numeric data type is unsigned
|
String |
value
字段名称
The column name, by default uses the field name
|
public abstract String value
public abstract DataType type
public abstract boolean unsigned
public abstract String length
public abstract boolean notNull
public abstract String comment
public abstract String referenceField
@Column(type = DataType.BIGINT, comment = "项目ID", referenceField = "id")
private Subject subject;
the selected field will be: subject AS `subject.id`Copyright © 2019. All rights reserved.