I'm using Spring Tools for a project. Is there a way of constraint a column with a unique value?
For example, some like this:
@Entity
@Table(name = "seg_usuario")
public class User implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
@Column(uniqueValue="ESTGRL")
private String state;
}