Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

@GenericGenerator with increment throwing EntityExistsException

User_19BPUMar 18 2013 — edited Mar 28 2013
Hi,


javax.persistence.EntityExistsException: a different object with the same identifier value was already associated with the session: [com.xxx.ips.ow.domain.Owtitle#com.xxx.ips.ow.domain.Owtitle@cb0cda57]

Configuration in embeddable class:-

private long owpermid;
 @GenericGenerator(name="generator", strategy = "increment")
       @GeneratedValue(generator="generator")
       //@Generated(value = "increment")
       private long owtitleseq; 
Here when i insert the records in the respective table the Sequence is stored as zero and when i insert the second record it is throwing an error saying

javax.persistence.EntityExistsException: a different object with the same identifier value was already associated with the session:

I am not sure where I am going wronh with this? Please clarify.

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 25 2013
Added on Mar 18 2013
4 comments
4,466 views