I’m trying to make ends meet on merging Patient and Encounter data, but for some reason am yet to find, I’m getting this exception on calling
In order to see what really causes the error, I need to turn on Hibernate logging to see whats really going on. But I don’t know how cause I’m calling this core method from my module. Is this possible?
Like for instance you are merging Patients from serverA to B which a new server with Patients. However, data comes with primary keys and foreign keys set yet we use key Generator class of hibernate. Ok I tried as possible to set all these IDs like patientId to null to tell hibernate that this is a new Object. However, there some culprit id values that I could be missing to set to null which make Hibernate think that we are updating it ending up with StaleStateException
Check the Hibernate logs to see which row Hibernate is trying to updated or retrieve but I don’t know how to turn the Hibernate logging