Hello, I found a problem and I need help to solve it.
When I delete a primary bitstream in the Upload Step from the Submission of an item, the reference of this bitstream (primary_bitstream_id) is not removed from the table Bundle. I think that such behaviour is odd, because, if we look in the class org.dspace.content.Bitstream.java at line 533 to 536, there is a function to remove such reference. However, it isn't apparently working, and I was not able to fix that. Link to class file: https://github.com/DSpace/DSpace/blob/dspace-5_x/dspace-api/src/main/java/org/dspace/content/Bitstream.java#L533 This problem is occurring since we were using the DSpace version 1.7. Now we are migrating to DSpace 5.4 version, and it still happens. Does someone have found such error? Also, this error implies in a problem at the cleanup process that is becoming repetitive. When users delete the primary bitstream, the cleanup process is interrupted by an exception. If we use the verbose mode, we can get the following message: Error: ERROR: update or delete on table "bitstream" violates foreign key constraint "bundle_primary_bitstream_id_fkey" on table "bundle" Detail: Key (bitstream_id)=(872047) is still referenced from table "bundle". As alternatives, I think that we can: (1) remove the radio button to select the primary bitstream from the Upload Step; (2) change the Cleanup source code to execute a query that set NULL in all references that are chosen to be deleted (some like suggested in: https://groups.google.com/forum/#!searchin/dspace-tech/Error$3A$20ERROR$3A$20update$20or$20delete$20on$20table$20%22bitstream%22$20violates$20foreign$20key$20constraint$20%22bundle_primary_bitstream_id_fkey%22$20on$20table$20%22bundle%22%7Csort:relevance/dspace-tech/5RALskGUatI/eRXhuKX3BgAJ). -- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/dspace-tech. For more options, visit https://groups.google.com/d/optout.
