Hibernate ResultTransformer with JPA API
- by Timo Westkämper
Has anyone figured out a smart way to do query result transformation through a similar mechanism like specifying a ResultTransformer in Hibernate?
All I can think of is transforming each result row after it has been returned by the Query. Is there any other way?
For constructor projections (e.g. new DTO(arg1, arg2)) it can be defined in the JPQL query, at least for Hibernate, but how about other cases?