Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HHH-17051 (
https://hibernate.atlassian.net/browse/HHH-17051?atlOrigin=eyJpIjoiZWE0ZG...
)
Re: Default behavior for datatype Instant with a Oracle database does not behave as
expected. (
https://hibernate.atlassian.net/browse/HHH-17051?atlOrigin=eyJpIjoiZWE0ZG...
)
Have read the migration guide, and kind of read this “if possible, and
falls back to timestamp " = will work.
The “if possible” part refers to dialect capability.
This config-change, will it work in the long run (incubating)?
We might change the way how this is configured to have a uniform configuration for all
non-trivial Java types, but yes, you will always have an option to configure the default.
I’d recommend you to change the datatype on the database side though and avoid the
configuration, because this will avoid possible confusions about “what time zone is that
timestamp in?”.
I can understand the asking for trouble, problem here is our database is
already there, and it worked in hibernate 5.x
You’re doing a major version upgrade from Hibernate 5 to 6, so these sorts of behavior
changes should be expected. That’s what major versions are for. If Hibernate 6 we were
fully backwards compatible, we would have called it Hibernate 5.7.
So what do you suggest we should do in this case, to be future proof?
You can use the config for the meantime until you finish your migration, but long term,
I’d suggest you get rid off the columnDefinition in your entity model and change the
database type to timestamp with time zone.
(
https://hibernate.atlassian.net/browse/HHH-17051#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-17051#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#100234- sha1:9e2db29 )