Hibernate 6.1 “no viable alternative at input”
Spring boot migration to v.3.0 also migrates hibernate to v6.1.
Some queries might fail as some old HQL syntax is not supported anymore.
In my case, it was an old query containing entity.numericField is not 0
and another one entity.boleanField is true
The mistakes were around logical comparators, so I fixed with entity.numericField <> 0
and entity.boleanField = true
.
Quoting the number ('0') and the boolean (‘true’) also didn’t seem to cause parse errors.
This happened with Postgres 10 dialect.
Useful reference links:
Thanks for reading !
What to do next:
- Clap if useful
- Buy me a coffee
- Follow me for more
- Read my other articles below or from my profile
- Keep in touch on LinkedIn