代码改变世界

Hibernate中报错——node to traverse cannot be null

2012-03-07 13:38  一个寂寞的分享者  阅读(527)  评论(0编辑  收藏  举报

Hibernate中报错——node to traverse cannot be null

出现这种问题是因为HQL语句出现问题,引起内部查询对象为空,无法处理为空值引起的。

有可能是在update Student s set s.name = "徐越" ,set.age = 25 where s.num = 01 这样的更新hql语句中少了逗号“,”。

所以一旦出现这种错误,查hql语句。