i have a java bean , now i want to be sure that the field sholud be unique. Am using following code
@UniqueConstraint(columnNames={"username"})
public String username;
But am geting some error.
@UniqueConstraint is dissallowed for this location
Whats the proper way to use unique constraint?
Note:I am using play framework