From b55be9811500d83d11b73855c82165af4ca82074 Mon Sep 17 00:00:00 2001 From: vramik Date: Fri, 20 Jan 2023 14:13:22 +0100 Subject: [PATCH] Fix JpaClientModelCriteriaBuilder when querying by ALWAYS_DISPLAY_IN_CONSOLE with H6 --- .../map/storage/jpa/client/JpaClientModelCriteriaBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model/map-jpa/src/main/java/org/keycloak/models/map/storage/jpa/client/JpaClientModelCriteriaBuilder.java b/model/map-jpa/src/main/java/org/keycloak/models/map/storage/jpa/client/JpaClientModelCriteriaBuilder.java index f383875461..5e2a6af50c 100644 --- a/model/map-jpa/src/main/java/org/keycloak/models/map/storage/jpa/client/JpaClientModelCriteriaBuilder.java +++ b/model/map-jpa/src/main/java/org/keycloak/models/map/storage/jpa/client/JpaClientModelCriteriaBuilder.java @@ -71,8 +71,8 @@ public class JpaClientModelCriteriaBuilder extends JpaModelCriteriaBuilder cb.equal( - cb.function("->>", JsonbType.class, root.get("metadata"), cb.literal("fAlwaysDisplayInConsole")).as(Boolean.class), - value[0]) + cb.function("->>", String.class, root.get("metadata"), cb.literal("fAlwaysDisplayInConsole")), + convertToJson(value[0])) ); } else if (modelField == SearchableFields.ATTRIBUTE) { validateValue(value, modelField, op, String.class, String.class);