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

Validators should be called when unretiring/unvoiding an object

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Should
    • Resolution: Fixed
    • None
    • Core 2.2.0
    • None
    • None
    • Low

    Description

      When an object is being saved to the database through the API it first gets validated, apparently when unvoiding/unretiring objects the validation logic is skipped due to the fact that the responsible AOP is only wrapped around save methods, it's very likely that we're saving back invalid items to the database. Validator(s) should be called before saving an object that's getting unvoided/unretired.

      TODO

      • Go through all services and update all unretireXXX() and unvoidXXX() methods to call the appropriate save methods on the services instead of those on the DAO objects, you will need to call Context.getXXXService() and call save on the returned instance which should be a spring proxy object so that the AOP around save methods is applied.

      Gliffy Diagrams

        Attachments

          Issue Links

            Activity

              People

                jtatia Jai Tatia
                wyclif Wyclif Luyima
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: