Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMzVkMDkzOWFh...
) / Improvement (
https://hibernate.atlassian.net/browse/HHH-16317?atlOrigin=eyJpIjoiMzVkMD...
) HHH-16317 (
https://hibernate.atlassian.net/browse/HHH-16317?atlOrigin=eyJpIjoiMzVkMD...
) InstantAsTimestampWithTimeZoneJdbcType doesn't work for timestamp on PostgreSQL (
https://hibernate.atlassian.net/browse/HHH-16317?atlOrigin=eyJpIjoiMzVkMD...
)
Change By: Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
This There is useful when one wants to bind a {{timestamp}} parameter pg-jdbc issue that
prevents us from using this type:
[
https://github.com/pgjdbc/pgjdbc/issues/2862|https://github.com/pgjdbc/pg...]
Binding to an {{ Instant timestamptz }}, which might fail on PostgreSQL, because right
now, we use {{InstantAsTimestampWithTimeZoneJdbcType}} is our default choice for that
dialect, which binds {{ OffsetDateTime Instant }} through the JDBC driver.
It has yet to be confirmed if this is a bug or not , works without problems, but pgjdbc
shifts {{OffsetDateTime}} to the JVM TZ when binding to a {{timestamp}} column. If we
can’t be sure that this type is correct JDBC behavior, we might as well drop the
{{InstantAsTimestampWithTimeZoneJdbcType}} and use {{InstantAsTimestampJdbcType}} instead
for PostgreSQL used.
NB: Using the default {{ InstantAsTimestampJdbcType TimestampUtcAsJdbcTimestampJdbcType }}
uses a shared calendar for passing UTC on the other hand will work perfectly fine, as that
will always pass the time zone as argument. Maybe we need to copy that to be safe, but we
could switch between a copying and shared implementation based on what we know about the
drivers.
(
https://hibernate.atlassian.net/browse/HHH-16317#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16317#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#100219- sha1:eb3f1fe )