异常org.hibernate.QueryException: could not resol...
异常消息如下所示: 严重: Servlet.service() for servlet action threw exception org.hibernate.QueryException: could not resolve property: roleId of: com.sidi.vo.Roleitem [update com.sidi.vo.Roleitem ri set ri.isShow = '0' where ri.roleId=?] org.hibernate.QueryException: could not resolve property: task_no of: edu.cust.entity.Task 对应的语句是dao中的更新方法 String queryString = "update Roleitem ri set ri.isShow = '0' where ri.roleId =?"; 这个地方的roleId是在roleitem表中的,但只是此表的一个外键,所以应该写成 String queryString = "update Roleitem ri set ri.isShow = '0' where ri.role.roleId =?"; 问题解决!! ===================================这是别人的一个例子==