• Post Reply Bookmark Topic Watch Topic
  • New Topic

JPA unique constraint violated

 
Kc Sreejith
Greenhorn
Posts: 10
Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

We are facing a unique constraint violated exception on updating a value object. The value object is mapped to two tables using @SecondaryTable annotation as follows.


The print stack trace of the exception is as follows.




The data from the table getting wiped out after the exception is thrown...
 
Vijitha Kumara
Bartender
Posts: 3953
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the relationship between SHIPMENT & SHIPMENT_DETAILS and how you generate the PK_SHIPMENT_DETAILS key?
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!