-
Notifications
You must be signed in to change notification settings - Fork 930
Register localtimestamp as current_timestamp in Oracle9iDialect
#3707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Register localtimestamp as current_timestamp in Oracle9iDialect
#3707
Conversation
localtimestap as current_timestamp in Oracle9iDialect
localtimestap as current_timestamp in Oracle9iDialectlocaltimestamp as current_timestamp in Oracle9iDialect
|
So, using current_timestamp for an update or insert with Oracle was resulting into an UTC date stored in database, eventually converted back to the client current local on read if the typing of the table columns was timestamp with time zone too ; if I understand correctly. While on most other db NHibernate handles, it is a local time timestamp which is stored. So, that is a bug we are fixing here, but one that would require some data migration for the app affected, wouldn't it? |
|
Not sure on this front. I’ll try to add some verifications/test. If that change is not acceptable, we would need to add workaround to |
|
As a bug, fixing should always be acceptable. But here, as applications could possibly rely on the effects of this bug to be functional, if that is the case, we need to document it as a possible breaking change. |
|
To the above: my server is in UTC, and session UTC+10 |
|
So, I would say that this change is pretty safe and should not be breaking. However, we can say a few words in a probably breaking changes section if we want. In any way, I would like this to be included in 5.6, especially if we want to treat this as a breaking change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the union might cause some additional type conversion before inserting and checked with separated insert queries, same results.
|
@fredericDelaporte yeah, I was inserting separately. Just combined query when posting here. |

In Oracle
current_timestampandsystimestampreturnTIMESTAMP WITH TIME ZONEtype, which in Oracle ManagedDataAccess v23 turns intoDateTimeOffsetof expectedDateTime, so some tests fail.Switching it to
localtimestampto fix the problem.