mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-14 05:23:14 +00:00
[ 2102580 ] William Hays: Duplicate Handle exception when replacing bitstreams
http://sourceforge.net/tracker/index.php?func=detail&aid=2102580&group_id=19984&atid=119984 git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3112 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -1873,6 +1873,15 @@ public class Item extends DSpaceObject
|
||||
// remove all of our authorization policies
|
||||
AuthorizeManager.removeAllPolicies(ourContext, this);
|
||||
|
||||
// Remove any Handle
|
||||
// FIXME: HandleManager should provide a way of doing this.
|
||||
// Plus, deleting a Handle may have ramifications
|
||||
// that need considering.
|
||||
DatabaseManager.updateQuery(ourContext,
|
||||
"DELETE FROM handle WHERE resource_type_id= ? " +
|
||||
"AND resource_id= ? ",
|
||||
Constants.ITEM,getID());
|
||||
|
||||
// Finally remove item row
|
||||
DatabaseManager.delete(ourContext, itemRow);
|
||||
}
|
||||
|
Reference in New Issue
Block a user