From 3b82950b5791543c99871e024184f83f32bfad7e Mon Sep 17 00:00:00 2001 From: "Andrey B. Panfilov" Date: Fri, 5 Feb 2021 23:19:53 +1100 Subject: [PATCH] HHH-14438 - ValueHandlers are broken --- .../org/hibernate/jpa/spi/CriteriaQueryTupleTransformer.java | 2 +- .../criteria/internal/expression/CompoundSelectionImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/jpa/spi/CriteriaQueryTupleTransformer.java b/hibernate-core/src/main/java/org/hibernate/jpa/spi/CriteriaQueryTupleTransformer.java index 41c3f1d9de5b..2b9841f69e2d 100644 --- a/hibernate-core/src/main/java/org/hibernate/jpa/spi/CriteriaQueryTupleTransformer.java +++ b/hibernate-core/src/main/java/org/hibernate/jpa/spi/CriteriaQueryTupleTransformer.java @@ -46,7 +46,7 @@ public Object transformTuple(Object[] tuple, String[] aliases) { return tupleElements == null ? valueHandlerResult.length == 1 ? valueHandlerResult[0] : valueHandlerResult - : new TupleImpl( tuple ); + : new TupleImpl( valueHandlerResult ); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/expression/CompoundSelectionImpl.java b/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/expression/CompoundSelectionImpl.java index 27bc0f44bad6..8a46206fa5fe 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/expression/CompoundSelectionImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/expression/CompoundSelectionImpl.java @@ -63,7 +63,7 @@ public List getValueHandlers() { valueHandlers.add( valueHandler ); foundHandlers = foundHandlers || valueHandler != null; } - return foundHandlers ? null : valueHandlers; + return foundHandlers ? valueHandlers : null; } public void registerParameters(ParameterRegistry registry) {