PostgreSQL added the ability to query json/jsonb type columns with operators like this:
Code:
SELECT * FROM user u WHERE customerInfo @> :foo
where customerInfo is a jsonb column.
When investigating adding a custom SQLFunction implementation to my dialect, it seems like the
Code:
registerFunction
method and
Code:
SQLFunction
methods assume a function/operator of the form
Code:
function(arg1, arg2)
. Is there a way to implement a custom dialect for a function of the form
Code:
arg1 operator arg2
?
As a side note, I mention that I tried to do this using a
Code:
NativeNamedQuery
, but Hibernate would not recognize the named param, I assume because it believes the query is malformatted:
Code:
[Server:myserver] Caused by: java.lang.IllegalArgumentException: Parameter with that name [foo] did not exist
[Server:myserver] at org.hibernate.jpa.spi.BaseQueryImpl.findParameterRegistration(BaseQueryImpl.java:503)
Thanks!