-->
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: Update identity column using hibernate
PostPosted: Fri Jul 15, 2011 1:29 am 
Newbie

Joined: Fri Jul 15, 2011 1:23 am
Posts: 1
Hi,

Any one knows , how to update the identity column , w/o deleting the current object?

Thanks in advance.


Top
 Profile  
 
 Post subject: Re: Update identity column using hibernate
PostPosted: Fri Jul 15, 2011 6:40 am 
Newbie

Joined: Wed May 04, 2011 2:24 am
Posts: 10
Assuming the identity column is the primary key;

Section 2.1.4 of the EJB 3 JPA specification states: 'The application must not change the value of the primary key[8]. The behavior is undefined if this occurs.[9]'

Hibernate actually throws an exception when you attempt to modify a primary key.


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.