Hello!
I would like that a database's default value is used when doing an INSERT if a property is null.
For example:
<class name="Person" table="Person">
[....]
<property name="faktor" type="double">
<column name="faktor" default="1.0" />
</property>
</class>
In the Java code I create a new object Person, do not fill in the property faktor and save it in the database. But instead of the default value "1.0", NULL is saved. But I would like that 1.0 is saved.
Can someone help me out?
Thanks in advance,
Martin
|