Replies: 1 comment 8 replies
-
Yes, you can. |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, there is no direct way to get server date (in Oracle, SYSDATE) using NHibernate in a single query. We have to first execute HQL query to get current server date and then use that date for audit like InsertDate or ChangeDate column. We must optimized it to generate query like:
Insert Into TEST_TABLE (TT_KEY, TT_CODE, TT_ChangeDate, TT_ChangedBy) Values (SEQ_TABLE.NEXTVAL, 'CODE1', SYSDATE, 'X0SA2');
Update TEST_TABLE
Set TT_ChangeDate = Sysdate
Where TT_Key = 123;
Currently, we cannot generate SQL statement like this to use SYSDATE within the Insert or Update SQL statement generated by NHibernate.
Beta Was this translation helpful? Give feedback.
All reactions