Within DB schema having update_ts column with default value of sysdate (as in oracle) is working fine with me. Whenever I insert a new record, both
create_ts and
update_ts will have same information. And when the application updates the record, I will just pass on new date information to the update_ts column.
the following lines in the mapping are enough on my side.
Code:
<property name="createTs"
type="timestamp"
column="CREATE_TS" />
<property name="updateTs"
type="timestamp"
column="UPDATE_TS" />