严重:对于带有路径[org.hibernate.hql.internal.ast.QuerySyntaxException:引发异常的servlet上下文中的Servlet.service(),没有将org.hibernate.hql.internal.ast.QuerySyntaxException: attendance is not mapped
at org.hibernate.hql.internal.ast.util.SessionFactoryHelper.requireClassPersi
我正在使用spring boot和jpa存储库,我想使用hql查询从数据库中获取最后2条记录。我已经写了下面的查询,但它不工作。select news from NewsDTO news order by news.newsId desc limit 2) sub order by news.newsId asc") 它正在抛出下面的异常Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: ( near line 1, c