-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Manually assign value to a hibernate UUID
PostPosted: Tue Mar 22, 2011 7:50 am 
Newbie

Joined: Sat May 22, 2010 10:32 am
Posts: 3
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!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.