Replies: 1 comment
-
Elide has a mechanism to override the JPQL generation for any filter predicate or model field/predicate pair: https://elide.io/pages/guide/v6/16-performance.html#jpql-fragment-override You might be able to leverage this to create an equality statement for json types. |
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'm trying to filter on a one to many relationship and I'm getting back a 500 error.
The basic scenario:
I can perform simple gets and filters on alpha but when I attempt something like
api/alpha?filter=betas.name=='bob'
then I get a 500 error and the log hasorg.postgresql.util.PSQLException: ERROR: could not identify an equality operator for type json.
The query generated by elide is something like the following
select distinct alpha.config, beta.name from alpha left outer join beta on alpha.id = beta.alpha_id where beta.name in (?)
If I grab that query and attempt it in pgadmin I get the error about running a distinct on a json column. Is there any way around this? A way to exclude certain columns from the distinct query but still have it returned in the results? Other suggestions?
Beta Was this translation helpful? Give feedback.
All reactions