关于Hibernate的主键类型:uuid
升级到3.6.0后关于UUID的警告
原来的UUIDHexGenerator已不推荐使用,应用UUIDGenerator替代。
@GenericGenerator(name="system-uuid",strategy="uuid")
改为
@GenericGenerator(name="system-uuid",strategy="org.hibernate.id.UUIDGenerator")
//--------------------------------------------------------------------- @Id @GeneratedValue(generator = "system-uuid") @GenericGenerator(name = "system-uuid", strategy = "org.hibernate.id.UUIDGenerator") //---------------------------------------------------------------------
//--------------------------------------------------------------------- @GenericGenerator(name = "generator", strategy = "org.hibernate.id.UUIDGenerator") @Id @GeneratedValue(generator = "generator") //---------------------------------------------------------------------
一些版本是:org.hibernate.id.UUIDHexGenerator
但是得看jar才知道。
以前版本:
http://lipeng88213.iteye.com/blog/556010
http://blog.sina.com.cn/s/blog_694448320100o2zd.html
主键详解:
http://hi.baidu.com/zhaoyu1988312/blog/item/e9155b303df7f48fa8018e7c.html
相关推荐
DAV数据库 2020-05-11
八角塘塘主 2020-07-04
IBMRational 2020-03-07
suixinsuoyu 2020-02-22
Hashxu 2020-02-05
姚强 2020-01-08
chysunny 2019-12-17
jocleyn 2019-11-10
LuoXinLoves 2019-10-29
冷月醉雪 2016-11-24
89421950 2016-02-18
vagrant00 2014-05-02
89550492 2011-06-06
chenchuang 2010-10-27