[hibernate-issues] [JIRA] (HHH-13991) Make the TimstampType return the actual mapped Type (e.g., java.util.Date or java.sql.Timestamp) instead of always returning java.sql.Timestamp

Vlad Mihalcea (JIRA) jira at hibernate.atlassian.net
Thu Apr 30 04:01:21 EDT 2020


Vlad Mihalcea ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Af5e8c0d3-3aae-4bb4-a4e1-25463d60d232 ) *created* an issue

Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNWY4OGY0NzIxMTdmNDljZmE0NmI0MDQwNjAyM2NlMzYiLCJwIjoiaiJ9 ) / Improvement ( https://hibernate.atlassian.net/browse/HHH-13991?atlOrigin=eyJpIjoiNWY4OGY0NzIxMTdmNDljZmE0NmI0MDQwNjAyM2NlMzYiLCJwIjoiaiJ9 ) HHH-13991 ( https://hibernate.atlassian.net/browse/HHH-13991?atlOrigin=eyJpIjoiNWY4OGY0NzIxMTdmNDljZmE0NmI0MDQwNjAyM2NlMzYiLCJwIjoiaiJ9 ) Make the TimstampType return the actual mapped Type (e.g., java.util.Date or java.sql.Timestamp) instead of always returning java.sql.Timestamp ( https://hibernate.atlassian.net/browse/HHH-13991?atlOrigin=eyJpIjoiNWY4OGY0NzIxMTdmNDljZmE0NmI0MDQwNjAyM2NlMzYiLCJwIjoiaiJ9 )

Issue Type: Improvement Affects Versions: 5.4.14 Assignee: Vlad Mihalcea ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Af5e8c0d3-3aae-4bb4-a4e1-25463d60d232 ) Components: hibernate-core Created: 30/Apr/2020 01:01 AM Priority: Major Reporter: Vlad Mihalcea ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Af5e8c0d3-3aae-4bb4-a4e1-25463d60d232 )

Currently, when using the following mapping:

@Column(name = "published_on" )
@Temporal(TemporalType.TIMESTAMP)
private java.util.Date publishedOn;

When fetching the entity back, the `publishedOn` will be populated as a `java.sql.Timestamp` which can break equal checks.

( https://hibernate.atlassian.net/browse/HHH-13991#add-comment?atlOrigin=eyJpIjoiNWY4OGY0NzIxMTdmNDljZmE0NmI0MDQwNjAyM2NlMzYiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-13991#add-comment?atlOrigin=eyJpIjoiNWY4OGY0NzIxMTdmNDljZmE0NmI0MDQwNjAyM2NlMzYiLCJwIjoiaiJ9 )

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.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100125- sha1:c543463 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200430/05d4544d/attachment.html 


More information about the hibernate-issues mailing list