1
select s.id,s.a.id,s.siteName from site s where s.a.id=:b
我無法執行此語句。JPA選擇具有多個值的查詢
ERROR:
Cannot create TypedQuery for query with more than one return using requested result type [com.a.b.entity.site]
select s.id,s.a.id,s.siteName from site s where s.a.id=:b
我無法執行此語句。JPA選擇具有多個值的查詢
ERROR:
Cannot create TypedQuery for query with more than one return using requested result type [com.a.b.entity.site]
解決方法爲您的子問題: 使用這些轉換爲整數new Integer((int) object[0])
它的工作原理,謝謝 –
http://www.java2s.com/Tutorials/Java/JPA/4860__JPA_TypedQuery.htm –
的http://計算器。 com/questions/10807496/error-can-create-type -query-for-query-with-more-one-return – hasnae
謝謝你,但我用原生查詢,它工作。 –