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);