Hi all,
I am a bit unsure if this is the right place here to raise a potential bug in h2 (found in h2.1.200, h2.2.214 and the most recent h2.2.222):
a very straight forward
select * from test_table where
column1 like 'test%' escape ''
returns values (when appropriate) when MODE is not ORACLE but always returns an empty record set for MODE=ORACLE. This might be explainable due to the '' / empty string behavior in MODE=ORACLE - but it is quite problematic w/r to the following:
* the result set is completely different depending on the MODE
* ORA databases themselves do not allow for ESCAPE '' (ORA-01425)
* the H2 documentation says otherwise (escape '' deactivates escaping - no MODE specific behavior is mentioned)
* and probably the worst: as far as I can see, hibernate 6.x is now automatically generating SQL when LIKE is used adding escape '' to each query. I have not found a switch to deactivate that - hence you can currently not combine hibernate 6.x + h2 in ORACLE mode with non-native LIKE queries.
Any ideas or thoughts are much appreciated.
Thanks and Cheers
Bastian