用來聲明Hibernate描述文件的Tags:
Class層次Tags
@hibernate.class
@hibernate.subclass
@hibernate.discriminator
@hibernate.joined-subclass
@hibernate.joined-subclass-key
@hibernate.cache
@hibernate.jcs-cache
@hibernate.query
方法層次Tags
@hibernate.id
@hibernate.generator-param
@hibernate.property
@hibernate.component
@hibernate.version
@hibernate.timestamp
@hibernate.many-to-one
@hibernate.one-to-one
@hibernate.column
@hibernate.set
@hibernate.bag
@hibernate.list
@hibernate.map
@hibernate.array
@hibernate.primitive-array
@hibernate.collection-key
@hibernate.collection-index
@hibernate.index-many-to-many
@hibernate.collection-element
@hibernate.collection-composite-element
@hibernate.collection-many-to-many
@hibernate.collection-one-to-many
@hibernate.collection-cache
@hibernate.collection-jcs-cache
字段層次Tags
Tag用法, Class層次(@hibernate)
@hibernate.class (0..1)
聲明一個(gè)持久類
參數(shù)
|
類型
|
適用性
|
描述
|
是否必須
|
table
|
text
|
|
數(shù)據(jù)表名
|
false
|
discriminator-value
|
text
|
|
一個(gè)用于區(qū)分特殊子類的值
|
false
|
mutable
|
bool
|
|
指定該類的實(shí)例是否mutable:true/false
|
false
|
dynamic-update
|
bool
|
|
指定只有改變了的字段出現(xiàn)在SQL UPDATE中
|
false
|
dynamic-insert
|
bool
|
|
指定null字段不應(yīng)出現(xiàn)在SQL INSERT
|
false
|
polymorphism
|
text
|
|
使"explicit"多態(tài)性有效
可選項(xiàng):
explicit
implicit
|
false
|
schema
|
text
|
|
覆蓋schema在hibernate-mapping根元素中指定的名稱
|
false
|
proxy
|
text
|
|
為使用CGLIB proxies指定一個(gè)接口
|
false
|
@hibernate.subclass (0..1)
聲明當(dāng)前類為子類
參數(shù)
|
類型
|
適用性
|
描述
|
是否必須
|
discriminator-value
|
text
|
|
一個(gè)用于區(qū)分特殊子類的值
|
false
|
proxy
|
text
|
|
為使用CGLIB proxies指定一個(gè)接口
|
false
|
dynamic-update
|
bool
|
|
指定只有改變了的字段出現(xiàn)在SQL UPDATE中
|
false
|
dynamic-insert
|
bool
|
|
指定null字段不應(yīng)出現(xiàn)在SQL INSERT
|
false
|
@hibernate.discriminator (0..1)
Defines a discriminator
參數(shù)
|
類型
|
適用性
|
描述
|
是否必須
|
column
|
text
|
|
映射的目標(biāo)數(shù)據(jù)表字段
|
true
|
type
|
text
|
|
Hibernate 類型
|
false
|
length
|
text
|
|
映射字段的長度
|
false
|
@hibernate.joined-subclass (0..1)
Declare the current class as joined subclass
參數(shù)
|
類型
|
適用性
|
描述
|
是否必須
|
proxy
|
text
|
|
為使用CGLIB proxies指定一個(gè)接口
|
false
|
dynamic-update
|
bool
|
|
指定只有改變了的字段出現(xiàn)在SQL UPDATE中
|
false
|
dynamic-insert
|
bool
|
|
指定null字段不應(yīng)出現(xiàn)在SQL INSERT
|
false
|
schema
|
text
|
|
覆蓋schema在hibernate-mapping根元素中指定的名稱
|
false
|
@hibernate.joined-subclass-key (0..1)
Declares a joined-subclass key
參數(shù)
|
類型
|
適用性
|
描述
|
是否必須
|
column
|
text
|
|
映射的目標(biāo)數(shù)據(jù)表字段
|
true
|
@hibernate.cache (0..1)
Enables caching
|