Featured Post

Scalability Techniques

Scalability is about the capability of a system to manage the increase workload of a system without causing qualities impact (i.e. perfo...

Tuesday, May 26, 2015

JPA multiple Unique Constraint


@Table(name = "BEAN_TABLE", uniqueConstraints = @UniqueConstraint(columnNames = { "FIRST_COLUMN", "SECOND_COLUMN" }))
public class BeanExample {

 private static final long serialVersionUID = 1L;

 @Column(name = "ID")
 private String id = UUID.randomUUID().toString();

 private String firstColumn;

 private String secondColumn;


No comments :

Post a Comment