ERROR - Exception occurred during processing request: tb_staff is not mapped [from tb_staff where username=? and password=?]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: tb_staff is not mapped [from tb_staff where username=? and password=?]
from后面是实体名o(╯□╰)o
搞错,是from 后面 表名首字母大写或者是别的原因,反正我遇到同样问题是这样解决的
hql语句:from 表名,这里的表名是映射文件名
值都对上了,但还是提示这个错误ERROR - Exception occurred during processing request: tb_staff is not mapped [from tb_staff where username=? and password=?]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: tb_staff is not mapped [from tb_staff where username=? and password=?]
username和password的值对上了吗,都传递到hql语句中了吗