This is my JPA entity class:
@Cacheable
@Entity
public class JpaItemSearchRequest implements ItemSearchRequest {
@Id
@GeneratedValue
private lon
Unique constraint over columns in collection table can be defined by using @CollectionTable with element collection.
@CollectionTable(
uniqueConstraints= @UniqueConstraint(columnNames={"col1","col2"})
)
As said, those are columns of table where element collection is mapped. There is no way to have unique constraint over columns in multiple tables.