Featured Post

NoSQL use cases

Here are a simple summary of use cases for Cassandra, MongoDB and Redis MongoDB Storing Log Data Speed is the primary perfor...

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