// load resource
if (modRes.getResourceId() != null) {
Integer resId=modRes.getResourceId();
IResourceDAO resDAO=DAOFactory.getResourceDAO();
Resource res=resDAO.loadResourceById(resId);
insertResource(res, session);
SbiResources sbiRes= (SbiResources) session.load(SbiResources.class, res.getId());
if(sbiRes!=null){
hibModRes.setSbiResources(sbiRes);