Hi,
I haven't solved your problem, and apologies in advance if you know this already - but in case it helps.
The annotations for the unique keys work for me as follows:-
Code:
@Table(name = "STUFF", uniqueConstraints = {
@UniqueConstraint(name = "Unique_A_B", columnNames = { "COL_A", "COL_B" }),
@UniqueConstraint(name = "Unique_B_C", columnNames = { "COL_B", "COL_C" }) })
I have run the hibernate tool <hbm2hbmxml/> on this annotated file but the generated stuff.hbm.xml file did not define the constraints.
Again, sorry if this was obvious to you, but I thought it might help in some way. Martin.