Replies: 1 comment
-
At this moment there is no way to do it using the Criteria API. The only way is to create the SQL query manually. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I tried such things as
PredicateSpecification<TestEntity> { root, criteriaBuilder -> criteriaBuilder.function("jsonb_filter", String::class.java, root.get<Map<String,Any?>>("detail"), criteriaBuilder.literal("\\$.${path.escapeSpecialChars()}")).
in(true) }
where jsonb_filter is a self-defined database function in Postgres. But this throw an exception saying that "Not Supported Operations", and when I dived deep into the src code, I found the following lines:
@Override @NonNull public <T> Expression<T> function(@NonNull String name, @NonNull Class<T> type, @NonNull Expression<?>... args) { throw notSupportedOperation(); }
in AbstractCriteriaBuilder.class
Can anyone help me with this issue? Thanks。
Beta Was this translation helpful? Give feedback.
All reactions