• 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
Pie
Posts: 3930
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic