【发布时间】:2012-08-10 23:02:43
【问题描述】:
我正在使用 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 注释?
提前致谢
【问题讨论】:
标签: hibernate postgresql seam hibernate-mapping seam2