title: HIbernate Column with @ColumnDefault cannot be null
body: <p>My application uses hibernate with Spring Boot.</p>
  
  <p>I have created a table like this:</p>
  
  <pre><code>public class TopicSubscriberMap implements Serializable
  {   
      @ColumnDefault(value="'pending'")
      @Column(nullable=false)
      private String status;
      ...
  }
  </code></pre>
  
  <p>The table is getting created as follows in mysql:</p>
  
  <pre><code>mysql&gt; desc topic_subscriber_map;
  +---------------+--------------+------+-----+---------+-------+
  | Field         | Type         | Null | Key | Default | Extra |
  +---------------+--------------+------+-----+---------+-------+
  | status        | varchar(255) | NO   |     | pending |       |
  +---------------+--------------+------+-----+---------+-------+
  </code></pre>
  
  <p>On saving the table like this:</p>
  
  <pre><code>TopicSubscriberMap tsm = new TopicSubscriberMap();
  tsm = mapRepository.save(tsm);
  </code></pre>
  
  <p>I am getting an error:</p>
  
  <pre><code>com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'status' cannot be null
  </code></pre>
  
  <p>If I make the field nullable, then although the table is getting saved, but in the db, </p>
  
  <pre><code>+--------+
  | status | 
  +--------+
  | NULL   | 
  +--------+
  </code></pre>
  
  <p>Why is the @ColumnDefault not working? Where is my mistake here?</p>
  
  <p><strong>Edit:</strong>
  when i remove the @ColumnDefault and declare the column as</p>
  
  <pre><code>private String status = "pending"
  </code></pre>
  
  <p>then although the default value does work, but the table schema shows:</p>
  
  <pre><code>+---------------+--------------+------+-----+---------+-------+
  | Field         | Type         | Null | Key | Default | Extra |
  +---------------+--------------+------+-----+---------+-------+
  | status        | varchar(255) | NO   |     | NULL    |       |
  +---------------+--------------+------+-----+---------+-------+
  </code></pre>
  
  <p>How can I make the default value work and also show it in the table schema?</p>