JPQL: What kind of objects contains a result list when querying multiple columns?
- by Bunkerbewohner
Hello!
I'm trying to do something which is easy as pie in PHP & Co:
SELECT COUNT(x) as numItems, AVG(y) as average, ... FROM Z
In PHP I would get a simple array like [{ numItems: 0, average: 0 }] which I could use like this:
echo "Number of Items: " . $result[0]['numItems'];
Usually in JPQL you only query single objects or single columns and get Lists types, for example List or List. But what do you get, when querying multiple columns?