Hibernate version: 3.0.5
Using the attribute "foreign-key" in the mapping you can specify the name of the generated foreign key constraint.
Using the similar "unique-key" attribute seems only useful for grouping multiple columns in one constraint. The name specified is ignored. It's stated like this in the Hibernate reference too.
Is there a way to specify the names of the generated primary key and unique key constraints in the mapping documents?
If not, can anyone explain why?
Seems to me like this is something many people would need, e.g when reacting to a ConstraintViolationException.
Bye
Stefan
|