We have been using H2 for our db integration tests running it in Oracle mode (MODE=Oracle since our production database is Oracle. Then we used to use OracleDialect to make sure genereated sqls would be reasonably Oracle compliant. That way each developer working on db access code could easily run db integration tests quickly on their workstations. We upgraded from hibernate version 5.6.8 using org.hibernate.dialect.OracleDialect to version 6.1.6 again using org.hibernate.dialect.OracleDialect and one of our jpql queries failed that was using CASE statement for its order by clause with
Debugging it we found that OracleSqlAstTranslator gets Oracle version through OracleDialect class which in turn relies on H2 db driver version returning version 1-2 resulting line 420 picking visitDecodeCaseSearchedExpression instead of super.visitCaseSearchedExpression resulting in the error. That seems to be a minor error but we would appreciate if you could devise a solution otherwise we don’t know how to get our unit tests working. |