Alex Nistico (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNGQ3YzE1ZjFi...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16976?atlOrigin=eyJpIjoiNGQ3Yz...
) HHH-16976 (
https://hibernate.atlassian.net/browse/HHH-16976?atlOrigin=eyJpIjoiNGQ3Yz...
) Timestamps are not properly handled in batched select queries (
https://hibernate.atlassian.net/browse/HHH-16976?atlOrigin=eyJpIjoiNGQ3Yz...
)
Change By: Alex Nistico (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
In Hibernate 6 entities are selected using JDBC arrays for their key lookup when bach size
> 1, the problem is that the JDBC driver could create the array of object to bind by
just calling toString() on the instances, and java.sql.Timestamp produces a string
representation that is based on the system timezone, which is not necessarily the same
timezone as the database failing to retrieve entities by id.
The problem can be worked around by annotating the entity with @BatchSize(size=1), but
that is not ideal.
Attached is a reproduction project
(
https://hibernate.atlassian.net/browse/HHH-16976#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16976#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#100232- sha1:a133497 )