使用hibernate的hql语句做查询报错 org.hibernate.hql.internal.ast.QuerySyntaxException: user is not mapped

来源:互联网 发布:react数据传递 编辑:程序博客网 时间:2024/06/07 21:02

hql语句查询报错:

 org.hibernate.hql.internal.ast.QuerySyntaxException: Product is not mapped
[user is not mapped [select count(*) from user] 
首先需要注意,user是实体类的名称,而非对应的表明
其次就是看你的hibernate的配置文件中是否加入了usermapper
的映射,很多时候这一点比较容易忘记
阅读全文
0 0
原创粉丝点击