file « Default « JPA Q&A





2. Default value in mapping file    forum.hibernate.org

4. Setting default values for columns in mapping files.    forum.hibernate.org

Basically you need to tell Hibernate to not include the column when it is null. To do this - on the class tag specify dynamic-update="true" and dynamic-insert="true". That will allow the insert or update to not include any column that is null. By default this is false so Hibernate can pre-generate the insert and update SQL needed for the class. Also ...