Setting database-agnostic default column timestamp using Hibernate
- by unsquared
I'm working on a java project full of Hibernate (3.3.1) mapping files that have the following sort of declaration for most domain objects.
<property name="dateCreated" generated="insert">
<column name="date_created" default="getdate()" />
</property>
The problem here is that getdate() is an MSSQL specific function, and…