active_fedora icon indicating copy to clipboard operation
active_fedora copied to clipboard

Deleting aggregated object

Open hectorcorrea opened this issue 10 years ago • 1 comments

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_id is correctly set to nil.
  • If you fetch the work from Solr, work.thumbnail_id still points to the deleted FileSet.

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

hectorcorrea avatar Apr 19 '16 19:04 hectorcorrea

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.)

tpendragon avatar Apr 19 '16 19:04 tpendragon