[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:
Claudia Juergen
2009-07-14 11:18:24 +00:00
parent d9668a6520
commit fe332866bb
2 changed files with 10 additions and 8 deletions

View File

@@ -493,18 +493,19 @@ public class Bundle extends DSpaceObject
{
// We've found the bitstream to 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())));
// 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
DatabaseManager.updateQuery(ourContext,
"DELETE FROM bundle2bitstream WHERE bundle_id= ? "+

View File

@@ -10,6 +10,7 @@
(Claudia Juergen)
- [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-248] Missing admin column in community table in database-schema.sql and update - community admin patch