Hibernate version:
3.3.1
Mapping documents:
Annotations
Name and version of the database you are using:
Oracle 10g & Mysql 5
I've extended ImprovedNamingStrategy for generating automatic table plurals. I understand how to extend other methods as well, however, it looks like there is no method to override Foreign Key Constraints. Look at the constraint names in the sql generated by hbm-ddl in a sample mysql database for the table - abc_performances.
KEY `FKE581A57DE96031D4` (`performance_id`),
CONSTRAINT `FKE581A57DE96031D4` FOREIGN KEY (`performance_id`) REFERENCES `performances` (`id`)
Ideally, I would like the standard naming convention as
FK_PARENTTABLENAME_CHILDTABLE_NAME
Is there anyway, this could be achieved? (as an overriding method in NamingStrategy Interface)
|