The JPA spec does not demand that the resultClass work for scalar results. That's why there is an SqlResultSetMapping. Therefore, this is not a bug. If we decide to support this use case, it's going to be an enhancement to the current JPA specification. |