My file has field -
<property name="createdTs" type="timestamp">
<column name="created_ts" length="29" />
</property>
When I save the table with -
public void persist(DrRequest transientInstance) {
log.debug("persisting DrRequest instance");
try {
Transaction trans=sessionFactory.getCurrentSession().beginTransaction();
sessionFactory.getCurrentSession().persist(transientInstance);
trans.commit();
log.debug("persist successful");
} catch (RuntimeException re) {
log.error("persist failed", re);
throw re;
}
It doesn't saves the created_ts
field with current time in postgresql database table.
The type of created_ts
is timestamp without time zone
.