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

Foreign key constraint violation on ConceptWord when removing a concept name

    XMLWordPrintable

    Details

    • Complexity:
      Low

      Description

      If I call removeConceptName on a concept and then try to save the concept, I get a foreign key constraint violation on ConceptWord.

      I shouldn't have to do this to save a concept:

      Context.getConceptService().updateConceptIndex(c);
      c = Context.getConceptService().saveConcept(c);

      The fix for this is to clean up the conceptindex/conceptword in the ConceptServiceImpl.saveConcept method before saving the concept via the dao. (currently its immediately after)

      Add a unit test to prove that this was failing and is now working.

        Attachments

          Activity

            People

            Assignee:
            wyclif Wyclif Luyima
            Reporter:
            dthomas Dave Thomas
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour, 30 minutes
                1h 30m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 30 minutes
                1h 30m