[Bug daily] Admin (table name) is not mapped

严重: Exception occurred during processing request: Admin is not mapped [from Admin as ac where ac.adminname=? and ac.password=?]
org.hibernate.hql.internal.ast.QuerySyntaxException: Admin is not mapped [from Admin as ac where ac.adminname=? and ac.password=?]
    at org.hibernate.hql.internal.ast.QuerySyntaxException.generateQueryException(QuerySyntaxException.java:96)
。。。。。。

Today, I am writing code with the ssh framework, and I keep reporting this error when writing HQL statements, indicating that the table is not mapped.
If you have the same problem, check the following aspects:
1. "from Admin as ac where ac.adminname=? and ac.password=?", the entity class of from is not the table name, but the name of the class in Admin.java, Pay attention to capitalization.
2. The corresponding mapping file is not added to your hibernate configuration file <
3. If not, continue to look for similar errors elsewhere, I will provide an idea (●'◡'●)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325731268&siteId=291194637