首页 > 其他 > 详细

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

时间:2019-09-14 12:54:26      阅读:144      评论:0      收藏:0      [点我收藏+]
技术分享图片
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明确指定返回的列

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

原文:https://www.cnblogs.com/XingXiaoMeng/p/11518748.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!