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
Written by Yun Zhi Lin
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#