Uploaded image for project: 'COmanage'
  1. COmanage
  2. CO-1149

Cannot delete an identifier assignment with a sequential algorithm if it's been run at least once

    XMLWordPrintable

Details

    Description

      The Registry needs to delete the entry in the cm_co_sequential_identifier_assignments table before deleting the entry in the cm_co_identifier_assignments table, otherwise the following error will be thrown by the database:

      2015-10-03 11:45:15 Error: [PDOException] SQLSTATE[23503]: Foreign key violation: 7 ERROR: update or delete on table "cm_co_identifier_assignments" violates foreign key constraint "cm_co_sequential_identifier_as_co_identifier_assignment_id_fkey" on table "cm_co_sequential_identifier_assignments"
      DETAIL: Key (id)=(5) is still referenced from table "cm_co_sequential_identifier_assignments".
      Request URL: /registry/co_identifier_assignments/delete/5/co:2
      Stack Trace:
      #0 /var/www/html/comanage-registry-0.9.4/lib/Cake/Model/Datasource/DboSource.php(461): PDOStatement->execute(Array)
      #1 /var/www/html/comanage-registry-0.9.4/lib/Cake/Model/Datasource/DboSource.php(427): DboSource->_execute('DELETE FROM "p...', Array)
      #2 /var/www/html/comanage-registry-0.9.4/lib/Cake/Model/Datasource/DboSource.php(2121): DboSource->execute('DELETE FROM "p...')
      #3 /var/www/html/comanage-registry-0.9.4/lib/Cake/Model/Model.php(2709): DboSource->delete(Object(CoIdentifierAssignment), Array)
      #4 /var/www/html/comanage-registry-0.9.4/app/Model/AppModel.php(438): Model->delete('5', true)
      #5 /var/www/html/comanage-registry-0.9.4/app/Controller/StandardController.php(314): AppModel->delete('5')
      #6 [internal function]: StandardController->delete('5')
      #7 /var/www/html/comanage-registry-0.9.4/lib/Cake/Controller/Controller.php(490): ReflectionMethod->invokeArgs(Object(CoIdentifierAssignmentsController), Array)
      #8 /var/www/html/comanage-registry-0.9.4/lib/Cake/Routing/Dispatcher.php(193): Controller->invokeAction(Object(CakeRequest))
      #9 /var/www/html/comanage-registry-0.9.4/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke(Object(CoIdentifierAssignmentsController), Object(CakeRequest))
      #10 /var/www/html/comanage-registry-0.9.4/app/webroot/index.php(96): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
      #11

      {main}

      Attachments

        Activity

          People

            benn.oshrin@at.internet2.edu Benn Oshrin (internet2.edu)
            niheconomoum Matthew X. Economou (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: