title: How to work with zero dates ("0000-00-00") in Hibernate?
body: <p>I have MySql table that has a date field with zeroes ("0000-00-00") as its default value (field cannot be null, I can't change table structure). Hibernate doesn't like zero dates and throws exception during read or save. </p>
  
  <p>I managed to make it read records by setting MySql connection setting "zeroDateTimeBehavior=convertToNull" that converts zero dates to nulls while retrieving records. It is all working fine until I try to save the record that has null date - it throws exception that date cannot be null.</p>
  
  <p>So the question is - how to save record through Hibernate so date will appear as zeroes in a table? </p>
  
  <p>Thanks.</p>