@Column(name="column" , unique=true)
long column
=> @Table 속성 uniqueConstraints 사용
@Entity
@Table(
name="tableName",
uniqueConstraints={
@UniqueConstraint(
name={"contstraintName"}
columnNames={"col1", "col2"}
)
}
)
@Data
public class Entity{
@Column(name="col1")
int col1;
@Column(name="col2")
int col2;
}