hudmol/archivesspace — pull request #590 by lcdhoffman (2013-11-18 17:57:45+00:00)
Title: Unsavable ex toolkitis

It seems that when records with external_id data were being modified, the association was being removed by setting the foreign key to null, which broke an integrity constraint. I don't know of any reason to keep unassociated external_id data, so I've overridden the Sequel::Model _remove_all method so that it deletes the associated external_id data.

The issue became apparent when users tried to edit records imported from AT:
https://www.pivotaltracker.com/s/projects/386247/stories/60815988