I would like to return a List of Integers from a
javax.persistence.EntityManager.createNativeQuery call
javax.persistence.EntityManager.createNativeQuery
Why is the following incorrect?
JPA was designed to provide an automatic mapping between Objects and a relational database. Since Integer is not a persistant entity, why do you need to use JPA ? A simple JDBC request will work fine.