Hi,
As we know, in hibernate, configure the generator of a id to "uuid" , then hibernate will auto generate a UUID value to the id field when saving a new object.If configuring the generator to "assigned", the id must be assigned a value before saving a object.
And I found that if configuring the generator to uuid and assigning the id a value manually, the hibernate will change the value to a new UUID one.
My question is, when the generator is configured as uuid, how to manually assign a value to it?
ps, I use spring HibernateDaoSupport to save. org.springframework.orm.hibernate3.support.HibernateDaoSupport.save(Ojbect obj)
Thanks!
|