@Column(name = "userId")
@UniqueConstraint
private Integer userId;
I am using these annotation for entering data into database table.
i want to make userId field unique field. but when i am doing like it it is showing me error @UniqueConstraints is disallowed for this location.