Felix König (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5a4bad5...
) *commented* on HHH-16239 (
https://hibernate.atlassian.net/browse/HHH-16239?atlOrigin=eyJpIjoiZjgxMj...
)
Re: Queries with LIKE-filters always return empty results with H2 database in Oracle
Compatibility Mode (
https://hibernate.atlassian.net/browse/HHH-16239?atlOrigin=eyJpIjoiZjgxMj...
)
Thanks, explicitly setting the dialect to org.hibernate.dialect.OracleDialect instead of
letting hibernate auto-detect it (it auto-detects org.hibernate.dialect.H2Dialect ) fixes
the issue!
Hibernate currently does not officially support H2's Oracle compatibility
mode
I suppose this can be closed then, since my problem is caused by an unsupported usecase,
correct?
Probably completely unrelated, but just for the record: Using the OracleDialect causes a
different issues with timestamps being interpreted in the wrong timezone. I have already
set spring.jpa.properties.hibernate.jdbc.time_zone=UTC and am using
criteriaBuilder.literal(someOffsetDateTimeWithOffsetZero) in a query. When I set
spring.jpa.show-sql=true I see the timestamp being submitted without a time zone, e.g. {{
{ts '2021-01-02 00:00:00.000000'}
}} (With the H2 dialect it was e.g. timestamp with time zone '2021-01-02
00:00:00.000000Z' ). I was able to work around that issue by additionally setting the
H2 timezone using ;TIME ZONE=UTC in the jdbc connection string.
(
https://hibernate.atlassian.net/browse/HHH-16239#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16239#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100217- sha1:65be9f2 )