Undefined Error: org.hibernate.HibernateException: identifier of an instance of
com.shkco.adsr3.staticdata.vo.ClientGroup was altered from 2 to null
List<IClientGroup> clientGroupList = clientGroupService.getAllClientGroup(sessionContext);
boolean clientGroupValidate = true;
if(clientGroup != null){
if(clientGroupList != null){
for(IClientGroup clientGroups: clientGroupList){
if(clientGroup.equals(clientGroups.getClientGroupId())){
clientGroupValidate = false;
break;
}
}
}
if(Boolean.TRUE.equals(clientGroupValidate)){
IErrorMessage errorMsg = new ErrorMessage();
errorMsg.setErrorCode("SUMARAI00035");
errorMsg.setEnglishMessage("The clientGroup value must be in the DB!");
errorMsg.setChineseMessage("The clientGroup value must be in the DB!");
errorMessages.add(errorMsg);
}
}
clientGroupService.getAllClientGroup(sessionContext);
缓存问题
使用evict方法请除缓存……
本文探讨了在使用Hibernate框架时遇到的一个常见问题:尝试更新客户端组标识符为null而导致的异常。文中详细分析了代码段中可能存在的问题,并提出了通过清除缓存来解决问题的方法。
1684

被折叠的 条评论
为什么被折叠?



