MySQL Zero Datetime

MySQL has a behaviour to store null timestamp as: 0000-00-00 00:00:00
By default Hibernate will throw an exception whenever it found any row that has this zero datetime.
How to solve it:
Set this value in hibernate's property, hibernate will convert the zero datetime to null.
<prop key="hibernate.connection.zeroDateTimeBehavior">
convertToNull
</prop>

0 comments: (+add yours?)