mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-10 19:43:10 +00:00
[DS-734] Improve efficiency of Database accesses
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5706 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -1258,10 +1258,10 @@ public class Item extends DSpaceObject
|
||||
bundles.add(b);
|
||||
|
||||
// Insert the mapping
|
||||
TableRow mappingRow = DatabaseManager.create(ourContext, "item2bundle");
|
||||
TableRow mappingRow = DatabaseManager.row("item2bundle");
|
||||
mappingRow.setColumn("item_id", getID());
|
||||
mappingRow.setColumn("bundle_id", b.getID());
|
||||
DatabaseManager.update(ourContext, mappingRow);
|
||||
DatabaseManager.insert(ourContext, mappingRow);
|
||||
|
||||
ourContext.addEvent(new Event(Event.ADD, Constants.ITEM, getID(), Constants.BUNDLE, b.getID(), b.getName()));
|
||||
}
|
||||
|
Reference in New Issue
Block a user