I am migrating my project from Springboot 2.7 to 3. This infers an update of Hibernate from v5 to v6.
I have followed the migration guides etc and the project is working aside from certain JPA operations on a Actian Pervasive SQL database (for which I have a Custom dialect).
When I try saveAndFlush an entity that makes use of a composite key, where I have prepopulated said key, instead of generating a SELECT query (to check the key is not already in use, per expect JPA State-detection Strategy) using WHERE AND per the SB 2.6/Hibernate 5 logs:
select historylin0_.DocumentNumber from HistoryLines historylin0_ where historylin0_.DocumentNumber=? and historylin0_.ItemCode=?
Instead it generates a query using IN, which is not valid syntax for Pervasive SQL. i.e.
select * from "HistoryLines" h1_0 where (h1_0.DocumentNumber,h1_0.ItemCode) in ((?,?))
How to I set the dialect to use the old syntax?