Hello all:
In the database I am working with, there is a field called "modifiedDate" in every table. There is a "Default Binding" rule on that field.
Simply, if no date is passed during create or update, the database will insert the current date and time. However, it is a non-null field. So, I cannot pass null to it. I have to pass a date or nothing at all.
How can I map it to Hibernate beans?
With default configuration, If I create a new instance and don't set the 'modifiedDate', it is null by default, and Hibernate throw an error because it is non-null field.
How can I configuer Hibernate so that it recognize that there is a default binding role?
P.S. I am using SQL Server.
Thanks
|