我使用SEAM 2/Hibernate和PostgreSQL 9数据库。我有以下表多列唯一约束
Active Band
===========
active_band_id serial
active_band_user text
active_band_date timestamp
active_band_process integer
我想补充一点,确保每个新条目active_band_user和active_band_date的独特组合的约束。
每秒可能会有很多试图插入的东西,所以我需要尽可能高效,有没有可以在实体映射中使用的SEAM/hibernate注释?
在此先感谢
这似乎复制http://stackoverflow.com/questions/3211972/specifying-restrictions-unique-together-in -hibernate – 2017-04-19 14:52:43