Featured Post

Event Sourcing Video from Michael Ploed

Event Sourcing I want to share a great video I found few days ago that describes very well what Event Sourcing is.

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