2016-09-15 2 views
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] 
+0

http://www.java2s.com/Tutorials/Java/JPA/4860__JPA_TypedQuery.htm –

+0

HTTP를 정수로 : // 유래. com/questions/10807496/error-can-create-typedquery-for-more-than-one-return – hasnae

+0

고맙습니다. 네이티브 쿼리를 사용했는데 성공했습니다. –

답변

2

해결 방법 : 변환 이러한 사용은 new Integer((int) object[0])

+1

작동합니다. 감사합니다. –