您的位置:首页 > 移动开发

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

2016-11-05 16:40 429 查看
解决方案:

这一般是HQL语句错误

因为Hibernate是对类查询的 ,而不是对数据库表进行查询,from是实体类而不是表名!

例如:

String hql = “from Employee e where e.salay=? and e.email=?”;

Employee是实体类而不是表名!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  hibernate string 异常 ssh
相关文章推荐