org.hibernate.hql.ast.QuerySyntaxException: User is not mapped [from User].

来源:互联网 发布:能讲课的软件 编辑:程序博客网 时间:2024/06/10 06:01

错误原因:

1.from后跟实体类名(注意大小写)

2.hbm文件是否导入(数据库对应表产生的话可以排除)

3.在对应hbm文件中是否使用了auto-import=false如果用了就会导致mapping错误(本人遇到了,查了半天,切记!!!) 

 

-----

fornane