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

Replace saveOrUpdate with merge

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • TBD
    • Resolution: Cannot Reproduce
    • None
    • None
    • None
    • Undetermined

    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

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

                Dates

                  Created:
                  Updated:
                  Resolved: