I have a column in my Database, called updateddate, which should get inserted with sysdate through application.
If my application code encounters some exception, even then I want this column value to be inserted with sysdate through database.
So, through SQL script, I have given this column default to sysdate.
Below is my hibernate hbm xml file,
<property name="updatedDate" type="timestamp">
<column name="UPDATED_DATE" ></column>
</property>
However, the column is not getting inserted through my application when there are no exceptions. It is getting updated through DB. I am saying this by looking at the date format.
How to make the column to be inserted through application and only when it encounters exception it should get inserted through DB?
I tried insert=true. But didn't help.