Hi, Marco, Thanks for looking into this. I agree with you that the addScalar() call is not necessary, but it should not hurt, correct? Also with addScalar() call, the query.list() returns List<Integer[]> instead of List<Integer>. So I still think there is improvement can be done here. This is also a backward compatibility issue. The addScalar() call was necessary in older versions of hibernate. |