@Column(name = \"userId\")
@UniqueConstraint
private Integer userId;
I am using these annotation for entering data into database table. i want
And this is the explanation of the Hibernate doc version 3.5 for @UniqueConstraint
definition.
@Entity
@Table(name="tbl_sky",uniqueConstraints = {@UniqueConstraint(columnNames={"month", "day"})})
public class Sky implements Serializable {
...
}
and this is for Hibernate 4.3 example for @UniqueConstraint