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明確指定返回的列


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM