这句话的意思是你的数据库不支持自动递增主键(oracle就不支持)所以你的key generation需要从新设置。看看你的hbm.xml文件中key的generation这个属性是不是identity,是的话就换吧。一般换成native都能解决问题。
1) Assigned
主键由外部程序负责生成,无需Hibernate参与。
2) hilo
通过hi/lo 算法实现的主键生成机制,需要额外的数据库表保存主
键生成历史状态。
3) seqhilo
与hilo 类似,通过hi/lo 算法实现的主键生成机制,只是主键历史
状态保存在Sequence中,适用于支持Sequence的数据库,如Oracle。
4) increment
主键按数值顺序递增。此方式的实现机制为在当前应用实例中维持
一个变量,以保存着当前的最大值,之后每次需要生成主键的时候
将此值加1作为主键。
这种方式可能产生的问题是:如果当前有多个实例访问同一个数据
库,那么由于各个实例各自维护主键状态,不同实例可能生成同样
的主键,从而造成主键重复异常。因此,如果同一数据库有多个实
例访问,此方式必须避免使用。
5) identity
采用数据库提供的主键生成机制。如DB2、SQL Server、MySQL
中的主键生成机制。
6) sequence
采用数据库提供的sequence 机制生成主键。如Oralce 中的
Sequence。
7) native
由Hibernate根据底层数据库自行判断采用identity、hilo、sequence
其中一种作为主键生成方式。
8) uuid.hex
由Hibernate基于128 位唯一值产生算法生成16 进制数值(编码后
以长度32 的字符串表示)作为主键。
9) uuid.string
与uuid.hex 类似,只是生成的主键未进行编码(长度16)。在某些
数据库中可能出现问题(如PostgreSQL)。
10) foreign
使用外部表的字段作为主键
| < 上页 |
|---|



Changing the portrayal 重庆团购of women and minorities is also seen as a means of altering societal attitudes
about these
groups. In summer 1999, the 淘宝网NAACP and a coalition of Hispanic groups attracted widespread media attention
with the
complaint that the six broadcast 淘宝网女装networks were offering a fall 1999 season largely without African American or
Hispanic actors. The evidence 淘宝网Media critic Jonathan Storm noted, "Of the 38 new shows . . . only
one-fourth feature
even one African American 淘宝商城character in a major role; half of those shows are on one network, UPN. The
pilots of only
three new shows had Latino 重庆二手交易characters: a police officer, an emergency medical technician, and a street-punk
bully." The protest was effective. Five 重庆二手电脑 of the six networks responded by adding actors of color to the casts of
prime-time shows did not rule out ...