Use JSONB '->>' function to avoid unnecessary JSON conversion in criteria builders.
Closes #12280
This commit is contained in:
parent
c3d53ae6e0
commit
02a69561b5
1 changed files with 2 additions and 2 deletions
|
@ -71,8 +71,8 @@ public class JpaClientModelCriteriaBuilder extends JpaModelCriteriaBuilder<JpaCl
|
|||
|
||||
return new JpaClientModelCriteriaBuilder((cb, query, root) ->
|
||||
cb.equal(
|
||||
cb.function("->", JsonbType.class, root.get("metadata"), cb.literal("fAlwaysDisplayInConsole")),
|
||||
cb.literal(convertToJson(value[0])))
|
||||
cb.function("->>", JsonbType.class, root.get("metadata"), cb.literal("fAlwaysDisplayInConsole")).as(Boolean.class),
|
||||
value[0])
|
||||
);
|
||||
} else if (modelField == SearchableFields.ATTRIBUTE) {
|
||||
validateValue(value, modelField, op, String.class, String.class);
|
||||
|
|
Loading…
Reference in a new issue