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
使用JPA的Criteria进行安全类型的查询分页数据,执行抛出: No explicit selection and an implicit one could not be determined 异常,原因是使用CriteriaBuilder.createTupleQuery进行查询,没有置顶查询的结果集的列,需要使用 query.multiselect明确指定返回的列
复制请注明出处,在世界中挣扎的灰太狼