S2SH开发中的Error-映射错误

来源:互联网 发布:手机淘宝写追评句子 编辑:程序博客网 时间:2024/06/06 15:42

Hibernate中的 not mapped

5 1节不要放弃治疗

HTTP Status 500 - user is not mapped [from user where name=? and phone=? order by id]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: user is not mapped [from user where name=? and phone=? order by id]


这是Hibernate中的HQL语句标准 ,这样的"from user where name=? and phone=? order by id"是不行的,因为user不是一个类,应该这样写"from User u where u.name=? and u.phone=? order by id"


这样解决之后

HTTP Status 404 - /AnkeleBlog2/list.jsp

404不是500,说明是有效果的

数据库中也多出了一条记录

微调一下路径,OK了,后面还有很多的问题,来吧!

1 0
原创粉丝点击