Getting error while updating the Table.

We are inserting into a table which is working fine. But later on in the same process mdoel we are updating the same row which we inserted. It is throwing error:

Details: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update: java.sql.BatchUpdateException: Duplicate entry '15' for key 'PRIMARY': com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '15' for key 'PRIMARY' Data: 

 

Our cdt has foreign key mapping as well. The primary key is auto generated.

 

  Discussion posts and replies are publicly visible