jpa CriteriaQueryNo explicit selection and an implicit one could not be determined

jpa CriteriaQueryNo explicit selection and an implicit one could not be determined
java.lang.IllegalArgumentException: Error occurred validating the Criteria
    。。。
Caused by: java.lang.IllegalStateException: No explicit selection and an implicit one could not be determined
View Code

使用JPA的Criteria进行安全类型的查询分页数据,执行抛出: No explicit selection and an implicit one could not be determined 异常,原因是使用CriteriaBuilder.createTupleQuery进行查询,没有置顶查询的结果集的列,需要使用 query.multiselect明确指定返回的列

上一篇:数据预处理-相关性过滤(F检验和互信息法)


下一篇:使用ContentProvider共享数据