Hello,

I came along here having the same problem. Setting H2 to Oracle mode 
doesn't make Hibernate detect "Oracle" dialect, still uses "H2" dialect, 
and in H2 dialect it keeps putting this damned "ESCAPE ''" sequence. We 
have two parties which say it's the other side's problem, no improvement to 
come.

But my question is: if H2 says "ESCAPE ''" is not a valid syntax in Oracle 
mode, shouldn't it then at least give an error message instead of simply 
returning no results? An error message would make it much much easier to 
spot the bug and create a workaround.

Regards

Marcus.
Evgenij Ryazanov schrieb am Donnerstag, 14. September 2023 um 10:54:07 
UTC+2:

> Hello!
>
> This issue cannot be resolved on H2 side.
>
> ESCAPE '' is not valid according to the SQL Standard:
> > If the length in characters of ECV is not equal to 1, then an exception 
> condition is raised:
> > data exception — invalid escape character.
> Oracle throws an exception as expected:
> ORA-01425: escape character must be character string of length 1
>
> H2 allows ESCAPE '' with a special meaning, but this extension is not 
> portable across all compatibility modes, because in Oracle compatibility 
> mode (just like in the real Oracle) an empty character string and NULL 
> aren't distinct from each other and it isn't possible to distinguish them 
> here.
>
> This issue was already reported in bugtracker of Hibernate ORM:
> https://hibernate.atlassian.net/browse/HHH-16277
> It was closed as a duplicate of another issue, but I think it isn't a 
> duplicate and should be re-opened.
>

-- 
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 visit 
https://groups.google.com/d/msgid/h2-database/65cd2d32-2e23-4445-9462-9b8e9913c323n%40googlegroups.com.

Reply via email to