Answers for "value string default in spring jpa"

1

jpa default value

@Entity
public class User {    
  @Id    
  Long id;     
  
  @Column(columnDefinition = "varchar(255) default 'John Snow'")    
  private String name;     
  
  @Column(columnDefinition = "integer default 25")    
  private Integer age;     
  
  @Column(columnDefinition = "boolean default false")    
  private Boolean locked;
}
Posted by: Guest on October-15-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language