At the moment its impossible to map result sets with the NativeQuery API on ProducerQuery to known java types (for which a mapping on the used dialect exist) - see here: https://hibernate.atlassian.net/browse/HHH-12180 It would be nice if there would be support for such a mapping so that a:
List<Long> listWithLongs = session.createNativeQuery(theQuery, Long.class).list()
is possible to be used (without using raw types). |