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

Need mechanism to bypass ImmutableObsInterceptor

    XMLWordPrintable

Details

    • Enhancement
    • Status: Code Review (Post-Commit)
    • Should
    • Resolution: Unresolved
    • None
    • Core 2.6.0, Core 2.5.6
    • None
    • None
    • Medium

    Description

      In the Sync module, sync records are replayed on a remote server by saving each item in the record by Hibernate one by one.

      In the case of Obs Groups, each Obs is represented by sync item that needs to be saved, and then the Set association that ensures the right obs are in the right obs group is saved. Unfortunately, this logic now breaks in the latest OpenMRS versions.

      The resulting error is thrown from the ImmutableObsInterceptor, which is failing due to the fact that when flushing, it thinks the state of the Obs groupMembers has changed (from empty to containing Obs). I'm not entirely sure why this is happening now and it wasn't happening before, but may be due to changes in the Hibernate version.

      I have not yet identified a straightforward fix in the sync module, but I have been able to fix things by bypassing the validation checks built into the ImmutableObsInterceptor. This ticket is to provide a supported mechanism in our ImmutableEntityInterceptors that enable bypassing validation for particular operations as needed by the invoking code.

      Gliffy Diagrams

        Attachments

          Activity

            People

              mseaton Mike Seaton
              mseaton Mike Seaton
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: