When I execute the schemaexport, the generated DDL script contains cryptic foreign key constraint names like:
Quote:
alter table Address add index (PERSON_ID), add constraint FK1ED033D4D8F32245 foreign key (PERSON_ID) references Person (PERSON_ID);
The name FK1ED033D4D8F32245 starts good (FK), but ends bad (1ED033D4D8F32245).
Is there a feature with autonaming? I mean it would be good if the schemaexport could name the foreign key constraints automatically to FK_PERSON.
I tried to do it manually. It does not seem to work with Hibernate XDoclet tags:
Code:
/**
* @hibernate.set
* cascade="all"
* @hibernate.collection-key
* column="PERSON_ID"
* @hibernate.collection-one-to-many
* class="org.liberty.domainobjects.Address"
* foreign-key="FK_ADDRESS"
* @return java.util.Set
*/
public Set getAdresses() {
return adresses;
}
It had no effect on the generated hbm.xml file.[/code]