当前位置: 代码迷 >> J2EE >> SSH之HibernateTemplate 运用
  详细解决方案

SSH之HibernateTemplate 运用

热度:3270   发布时间:2013-02-25 21:41:10.0
SSH之HibernateTemplate 使用
异常信息是
The given object has a null identifier: com.gf.po.User; nested exception is org.hibernate.TransientObjectException: The given object has a null identifier: com.gf.po.User




Action调用方法使用
public String modifyUser(T user) throws Exception{
dao.updateObject(user);
return  "success";
}


public <T> void updateObject(T clazz){
this.getHibernateTemplate().update(clazz);
}



已经成功注入   更新的时候为什么会有那样的异常信息,使用HibernateTemplate  update  传入的对象每个属性都不能为空?请,看我的文章吧~
传送门:http://blog.csdn.net/qq183293/article/details/7884127
分就我就好了~呵呵
  相关解决方案