请教下面是什么错误?
七月 26, 2017 3:12:35 下午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [default] in context with path [/plat] threw exception [org.hibernate.HibernateException: HQL:from User as o where o.loginName = 'admin' synax error.User is not mapped [from User as o where o.loginName = 'admin']; nested exception is org.hibernate.hql.ast.QuerySyntaxException: User is not mapped [from User as o where o.loginName = 'admin']] with root cause
org.hibernate.HibernateException: HQL:from User as o where o.loginName = 'admin' synax error.User is not mapped [from User as o where o.loginName = 'admin']; nested exception is org.hibernate.hql.ast.QuerySyntaxException: User is not mapped [from User as o where o.loginName = 'admin']
SQL是这样,String Sql = "from User as o where o.loginName = '" + loginName + "'";
我hql是写的是PO对象,不是table名,感觉没错吖,百度了一下实在没找解决方法,请问是什么错误,怎么解决?