0

I am inserting/updating data using EntityManager.merge(). When I add new data it works fine and when I try to update the added data in the same session I am getting persistence exception.

Persistence exception occurred while merging with database

The exception occurs because of unique constraint violation. I am using Hibernate 3.3.2. Any idea why I am getting this exception?

Thanks

C.K
  • 171
  • 1
  • 3
  • 14
  • read this https://stackoverflow.com/questions/4889730/jpa-entitymanager-merge-is-trying-to-create-a-new-row-in-the-db-why it might help you – XtremeBaumer Sep 20 '17 at 06:35
  • 1
    Can you pls post your code here? without that cant conclude things. – DevGo Sep 20 '17 at 07:11

0 Answers0