Hibernate and default values

Posted by Schildmeijer on Stack Overflow See other posts from Stack Overflow or by Schildmeijer
Published on 2009-04-20T10:28:16Z Indexed on 2010/03/28 17:13 UTC
Read the original article Hit count: 271

Filed under:
|

Is it possible to use annotations to map a default value for a column? eg. I have a column named 'date' which is supposed to be '0000-00-00 00:00:00' if not date is explicitly given. I know I can add this to the ctor of the Entity. But then the default behavior will no be present in my database backend. (eg. Default column in mysql)

© Stack Overflow or respective owner

Related posts about hibernate

Related posts about database