HTTP Status 500 - user is not mapped [from user]; nested exception is org.hibernate.hql.ast.QuerySyn

type Exception report

message user is not mapped [from user]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: user is not mapped [from user]

description The server encountered an internal error that prevented it from fulfilling this request.

原因:

找不到mapping

解决:

1.看了网上很多人说是映射文件的问题,可我找了很久发现不是

2.后面去网上看了很久,才发现,在HQL里面查询的from后面要是你映射的对应实体类的名称,而不是你数据库里面的表名。

这个错误是真的无语...

猜你喜欢

转载自blog.csdn.net/qq_41700374/article/details/81544847