I’m noticing a difference in the generated SQL for the ‘<>’ (not equal) operator between the 5.6.x series and the 6.x series while attempting to upgrade, and the difference appears to be causing PostgreSQL fits.
Sample JPA query: “select v from SampleEntity v where mycol <> -1” (where ‘mycol’ is an integer column).
In the 5.6.x series the generated SQL will look something like: “select * from sample where mycol<>-1” (notice that the query contains ‘<>’).
In the 6.x series, the generated SQL will look something like: “select * from sample where mycol!=-1” (notice that the query uses '!=" instead of expected ‘<>’)
The problem is that PostgresSQL will barf indicating that ‘!=-’ is not a valid operator. Wouldn’t be an issue if the generated SQL added whitespace around the ‘!=’, but since it doesn’t PostgresSQL is mis-interpreting the operator. The H2 DB I use in unit tests, appears to handle this case without issue.
Am I missing something? Is there a work-around or is this a real bug that somehow nobody else has noticed?