Tom jaison
Tom jaison

Reputation: 205

JPA select query with multiple values

select s.id,s.a.id,s.siteName from site  s where s.a.id=:b

I cannot execute this statement.

ERROR:
Cannot create TypedQuery for query with more than one return using requested result type [com.a.b.entity.site]

Upvotes: 1

Views: 1460

Answers (1)

Abhishek Ramachandran
Abhishek Ramachandran

Reputation: 1170

Workaround for your sub question: use these to convert to integer new Integer((int) object[0])

Upvotes: 2

Related Questions