bja74q
Last Updated: February 25, 2016
·
240
· yunspace
Img 0748

Avoid "?" operator conflict between Postgres JSONB and Hibernate/JDBC

We came across this very issue when using Hibernate to query a JSONB column in Postgres. You want to use the "?" operator to check if the JSONB column contains certain values but Hibernate thinks the "?" is a placeholder for a parameter.

The following stackoverflow answer provides the perfect solution. Overwrite the "?" with a different operator such as "#-#" and use that instead.

http://stackoverflow.com/questions/27573778/postgresql-jsonb-and-jdbc

Say Thanks
Respond