Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-3199

Replace saveOrUpdate with merge

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: TBD
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Complexity:
      Undetermined
    • Development:

      Description

      TODO: A merge is necessary here because hibernate thinks that Patients and Persons are the same objects. So it sees a Person object in the cache and claims it is a duplicate of this Patient object.
      patient = (Patient) sessionFactory.getCurrentSession().merge(patient);
      File: /openmrs/api/src/main/java/org/openmrs/api/db/hibernate/HibernatePatientDAO.java
      Line: 99

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                Unassigned Unassigned
                Reporter:
                nullakilla Anton Alekseiev
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: