object references an unsaved transient instance

来源:互联网 发布:小明seo博客 编辑:程序博客网 时间:2024/05/27 06:52
if(pid != null && pid > 0 ){//如果有父节点category.setParent(categoryDao.load(pid));//设置其父节点}else{category.setParent(null);}
将为空的对象属性,设置为null
0 0
原创粉丝点击