-->
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.  [ 2 posts ] 
Author Message
 Post subject: set an id based on GeneratedValue
PostPosted: Mon Oct 27, 2008 4:42 am 
Newbie

Joined: Fri Sep 26, 2008 4:45 am
Posts: 17
Hi,

I need to manually set an id of an entity that is managed as a GeneratedValue.

If I set the id to 10 (manually) then hibernate still save the entity with another id (the max I think)

How can bypass this ?

Thanks


Top
 Profile  
 
 Post subject: Id generated value
PostPosted: Mon Oct 27, 2008 11:46 am 
Newbie

Joined: Sun Oct 26, 2008 5:49 pm
Posts: 6
Hi,

looks like u have used one of the hibernates in built mechanisms to generate the ID,

please check that you could used "Assigned" eg

<id name="id" column="id">
<generator class="assigned" />




All the best !


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

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.