Hibernate ResultTransformer is @Deprecated. What to use instead?


#1

I use query.setResultTransformer(**), but this method is titled Deprecated.

Which method replaced setResultTransformer?


#2

For the moment, there is no replacement.

In 6.0, the ResultTransformer will be replaced by a @FunctionalInterface, but the underlying mechanism of transforming the Object[] property values will probably be the same.

Therefore, you can use it as-is and, only if you upgrade to 6.0, you will have to think about replacing it with the new variant.