org.hibernate.hql.ast.QuerySyntaxException is not mapped异常

来源:互联网 发布:英魂之刃刷点卷软件 编辑:程序博客网 时间:2024/06/05 05:08

解决方案:
这一般是HQL语句错误
因为Hibernate是对类查询的 ,而不是对数据库表进行查询,from是实体类而不是表名!
例如:
String hql = “from Employee e where e.salay=? and e.email=?”;

Employee是实体类而不是表名!

0 0
原创粉丝点击