postgresql-logo

How to fix “PSQLException: ERROR: operator does not exist: … = character varying” in Spring JDBC and Spring Data JDBC

The error org.postgresql.util.PSQLException: ERROR: operator does not exist: my_enum_type = character varying can be fixed by using implicit conversions in PostgreSQL or using explicit conversions by passing the java.sql.Types.OTHER to Spring JDBC. The exception you will receive When using Spring JDBC or Spring Data JDBC and custom Java enum types, Read more…