@Column(name = \"userId\") @UniqueConstraint private Integer userId;
I am using these annotation for entering data into database table. i want
@Column(name = "userId",unique=true)
or if its an DB generated ID you can also do this
@Id @GeneratedValue(strategy=GenerationType.AUTO) private Integer id;