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) ->
|
return new JpaClientModelCriteriaBuilder((cb, query, root) ->
|
||||||
cb.equal(
|
cb.equal(
|
||||||
cb.function("->", JsonbType.class, root.get("metadata"), cb.literal("fAlwaysDisplayInConsole")),
|
cb.function("->>", JsonbType.class, root.get("metadata"), cb.literal("fAlwaysDisplayInConsole")).as(Boolean.class),
|
||||||
cb.literal(convertToJson(value[0])))
|
value[0])
|
||||||
);
|
);
|
||||||
} else if (modelField == SearchableFields.ATTRIBUTE) {
|
} else if (modelField == SearchableFields.ATTRIBUTE) {
|
||||||
validateValue(value, modelField, op, String.class, String.class);
|
validateValue(value, modelField, op, String.class, String.class);
|
||||||
|
|
Loading…
Reference in a new issue