I'm using hibernate 5.0.12 with springboot 1.5.14.
My entity has this id
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name = "UserID", nullable = true)
public int getUserId() {
return this.userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
In my database are presents record with id = 0
.
If I read, edit and save these record, hibernate duplicates these record with new id generated.
How I configure hibernate to allow id = 0
value?
In eclispelink this configuration is "eclipselink.id-validation" = "NULL"