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