mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-15 05:53:08 +00:00
[DS-197] Deleting a primary bitstream does not clear the primary_bitstream_id on the bundle table
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4088 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -493,18 +493,19 @@ public class Bundle extends DSpaceObject
|
|||||||
{
|
{
|
||||||
// We've found the bitstream to remove
|
// We've found the bitstream to remove
|
||||||
li.remove();
|
li.remove();
|
||||||
|
|
||||||
// In the event that the bitstream to remove is actually
|
|
||||||
// the primary bitstream, be sure to unset the primary
|
|
||||||
// bitstream.
|
|
||||||
if (b.getID() == getPrimaryBitstreamID()) {
|
|
||||||
unsetPrimaryBitstreamID();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ourContext.addEvent(new Event(Event.REMOVE, Constants.BUNDLE, getID(), Constants.BITSTREAM, b.getID(), String.valueOf(b.getSequenceID())));
|
ourContext.addEvent(new Event(Event.REMOVE, Constants.BUNDLE, getID(), Constants.BITSTREAM, b.getID(), String.valueOf(b.getSequenceID())));
|
||||||
|
|
||||||
|
// In the event that the bitstream to remove is actually
|
||||||
|
// the primary bitstream, be sure to unset the primary
|
||||||
|
// bitstream.
|
||||||
|
if (b.getID() == getPrimaryBitstreamID())
|
||||||
|
{
|
||||||
|
unsetPrimaryBitstreamID();
|
||||||
|
}
|
||||||
|
|
||||||
// Delete the mapping row
|
// Delete the mapping row
|
||||||
DatabaseManager.updateQuery(ourContext,
|
DatabaseManager.updateQuery(ourContext,
|
||||||
"DELETE FROM bundle2bitstream WHERE bundle_id= ? "+
|
"DELETE FROM bundle2bitstream WHERE bundle_id= ? "+
|
||||||
|
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
(Claudia Juergen)
|
(Claudia Juergen)
|
||||||
- [DS-188] Misspell exclude.type=indentifier in dstat.cfg
|
- [DS-188] Misspell exclude.type=indentifier in dstat.cfg
|
||||||
|
- [DS-197] Deleting a primary bitstream does not clear the primary_bitstream_id on the bundle table
|
||||||
- [DS-231] Missig file (just some obsolete use of index-all in the current documentation, corrected the docs)
|
- [DS-231] Missig file (just some obsolete use of index-all in the current documentation, corrected the docs)
|
||||||
- [DS-248] Missing admin column in community table in database-schema.sql and update - community admin patch
|
- [DS-248] Missing admin column in community table in database-schema.sql and update - community admin patch
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user