I've been scratching my head over this error for sometime now but can't work it out. I've been using Hibernate 3 to persist User entity. But I am getting
java.sql.SQLException: Field 'passwordConfirmation' doesn't have a default value error when I try to do that.
Following is my User entity:
User.javaCode:
@Entity
public class User implements Serializable {
private Long id;
private String email;
private String password;
private String passwordConfirmation;
private String captcha;
@Id @GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
@NotEmpty
@Email
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
@NotEmpty
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}
Could someone help me understand that why am I getting this error?