title: Setting default value for Date field in Grails Domain Class
body: <p>I'm trying to set a default value for a <code>Date</code> field in a Domain class.</p>
  
  <p>I can use <code>defaultValue</code> in the <code>mapping</code> configuration but it doesn't work with <code>Date</code> fields (I've tried it on <code>String</code> and <code>Integer</code> and it works fine).</p>
  
  <p>This is an example:</p>
  
  <pre><code>class Something {
  
      Date myField
  
      static mapping = {
          myField defaultValue: new Date()
      }
  
  }
  </code></pre>
  
  <p>This code fails because the CREATE statement that Hibernate generates is incorrect. It is something like:</p>
  
  <pre><code>... my_field datetime default Mon Nov 25 17:59:08 UYST 2013 not null ...
  </code></pre>