mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 10:04:21 +00:00
Merge pull request #1977 from TAMULib/DS3775-hibernate-session-bug
[DS-3775] Hibernate session bug when submitting item with Versioning enabled
This commit is contained in:
@@ -58,7 +58,8 @@ public class HandleUtil
|
|||||||
Request request = ObjectModelHelper.getRequest(objectModel);
|
Request request = ObjectModelHelper.getRequest(objectModel);
|
||||||
|
|
||||||
DSpaceObject dso = (DSpaceObject) request.getAttribute(DSPACE_OBJECT);
|
DSpaceObject dso = (DSpaceObject) request.getAttribute(DSPACE_OBJECT);
|
||||||
|
Context context = ContextUtil.obtainContext(objectModel);
|
||||||
|
|
||||||
if (dso == null)
|
if (dso == null)
|
||||||
{
|
{
|
||||||
String uri = request.getSitemapURI();
|
String uri = request.getSitemapURI();
|
||||||
@@ -88,13 +89,12 @@ public class HandleUtil
|
|||||||
|
|
||||||
handle = handle.substring(0, secondSlash);
|
handle = handle.substring(0, secondSlash);
|
||||||
|
|
||||||
Context context = ContextUtil.obtainContext(objectModel);
|
|
||||||
dso = handleService.resolveToObject(context, handle);
|
dso = handleService.resolveToObject(context, handle);
|
||||||
|
|
||||||
request.setAttribute(DSPACE_OBJECT, dso);
|
request.setAttribute(DSPACE_OBJECT, dso);
|
||||||
}
|
}
|
||||||
|
|
||||||
return dso;
|
return context.reloadEntity(dso);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user