Getting error while updating the Table.

Certified Associate Developer

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

Parents
  • Hi Deepti,

    this error explains that write to data store smart service trying to insert same set of data again with same primary key 15. Try to save response of write to data store smart service in same cdt in output section. then update some fields and again excecute this smart service.it should work. also please share your cdt xsd for further investigation if this does not resolve your issue.

    Regards,
    sandeep
Reply
  • Hi Deepti,

    this error explains that write to data store smart service trying to insert same set of data again with same primary key 15. Try to save response of write to data store smart service in same cdt in output section. then update some fields and again excecute this smart service.it should work. also please share your cdt xsd for further investigation if this does not resolve your issue.

    Regards,
    sandeep
Children
No Data