JPA select 具有多个值的查询

JPA select query with multiple values

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

我无法执行这条语句。

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])