title: Hibernate default varchar value - Postgres
body: <p>I have a Postgres database that i have mapped with Hibernate, and everything was working fine until i had the need of adding a new attribute.
  I've added an attribute "ROLE" which needs to be not null and have the value "USER" by default.
  In Postgres i have <code>ROLE VARCHAR(60) NOT NULL DEFAULT 'USER'</code> which i believe is correct, and i also have</p>
  
  <pre><code>@Column(name = "role", length = 60, nullable = false, columnDefinition = "varchar(60) default 'USER'")
  public String getRole() {
      return this.role;
  }
  </code></pre>
  
  <p>The thing is, when i try to create a new entry in my DB it fails - <code>not-null property references a null or transient value</code></p>
  
  <p>I've tried everything but no luck... From what i read, what i have should have worked.
  Can anyone help please?</p>
  
  <p>Thank you.</p>