Deleting aggregated object
We have found that in Curation Concerns, when we delete a FileSet from a Work and the FileSet is assigned as the work thumbnail and/or representative media the data in Fedora is updated correctly but not the data in Solr.
To reproduce:
- Create a work
- Add a fileset to it
- Make the fileset the work.representative and work.thumbnail
- Save the work
- Delete the fileset
- If you fetch the work from Fedora,
work.thumbnail_idis correctly set tonil. - If you fetch the work from Solr,
work.thumbnail_idstill points to the deletedFileSet.
There seems to be code in ActiveFedora::Aggregations (::Proxy?) that makes sure the data in Fedora is correct, but it seems to leave Solr out of sync.
See this PR and the comments for more information on the issue: https://github.com/projecthydra-labs/curation_concerns/pull/732
I wonder if AF::Aggregations is actually fixing the data, or if it's just Fedora ensuring referential integrity. (The FileSet is deleted, so there can't be triples using it as the object.)