5.2.3. ResultTransformer
Especially when using projection, the data structure returned by a query (an object array in this case), is not always matching the application needs. It is possible to apply a
ResultTransformer
operation post query to match the targeted data structure:
Example 5.12. Using ResultTransformer in conjuncton with projections
Examples of
ResultTransformer
implementations can be found in the Hibernate Core codebase.