diff --git a/core/src/main/java/org/hibernate/loader/custom/CustomLoader.java b/core/src/main/java/org/hibernate/loader/custom/CustomLoader.java index 5be16f42a5..852f14f464 100755 --- a/core/src/main/java/org/hibernate/loader/custom/CustomLoader.java +++ b/core/src/main/java/org/hibernate/loader/custom/CustomLoader.java @@ -328,7 +328,7 @@ public class CustomLoader extends Loader { } static private HolderInstantiator getHolderInstantiator(ResultTransformer resultTransformer, String[] queryReturnAliases) { - if ( resultTransformer != null ) { + if ( resultTransformer == null ) { return HolderInstantiator.NOOP_INSTANTIATOR; } else {