I use my uuid as follows:
@Id @GeneratedValue(generator = "uuid") @GenericGenerator(name = "uuid", strategy = "uuid") @Column(name = "uuid", unique = true) private String uuid;
but I get a hibernate smart warning:
Using org.hibernate.id.UUIDHexGenerator which does not generate IETF RFC 4122 compatible UUID values; consider using org.hibernate.id.UUIDGenerator instead
So, I want to switch to org.hibernate.id.UUIDGenerator , now my question is how can I tell the Hibernate generator about this. I saw some guy use it as "hibernate-uuid" - so this is what I tried, but with a negative result:
@Id @GeneratedValue(generator = "hibernate-uuid") @GenericGenerator(name = "hibernate-uuid", strategy = "hibernate-uuid") @Column(name = "uuid", unique = true) private String uuid;
java uuid annotations hibernate
Martin Jun 15 '11 at 11:14 2011-06-15 11:14
source share