duffymo wrote:
http://forum.hibernate.org/viewtopic.php?t=926778&highlight=unique+constraint
Looks like unique constraints should be maintained by the database. That means hand editing the schema that I generate from XDoclet/Ant, but I think I'd have to do that anyway.
This topic is irrevelent in your case, Actually, that's what you wanted to do, let hbm2ddl generate the unique constraint in your DB.
I don't know hbm2ddl enough to know how to do what you want, there's still hope :)
I'm afraid @hibernate.column unique="true" on several columns will create several 1-column contraints, have a quick try however.