Dear all,
is there a way to programmatically define a @SqlResultSetMapping ?
In hibernate and, if I dare to ask, JPA. I am currently using Hibernate 5.2.8.
Dear all,
is there a way to programmatically define a @SqlResultSetMapping ?
In hibernate and, if I dare to ask, JPA. I am currently using Hibernate 5.2.8.
Yes, you can use the ResultTransformer
which is even more powerful than SqlResultSetMapping. Check out this article for an example of using this Hibernate-specific result set mapper.
Thank you for the proposal.
For you who will find like me that it is @Deprecated, take a look at the answer to https://stackoverflow.com/questions/38240015/how-to-use-setresulttransformer-after-hibernate-5-2, where @vlad explains why it is still the way to go.