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. I have found much older threads here (like https://groups.google.com/g/h2-database/c/OQ7tXiFYT6o and https://groups.google.com/g/h2-database/c/zdqGA5cw3fM/m/C0J60SPjDfEJ but no answer) Any ideas or thoughts are much appreciated. Thanks and Cheers Bastian -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/c1379bc5-a2ee-4218-9d57-3feb0d86f45an%40googlegroups.com.
