Also have problem with too long FK name with Hibernate 4.2.2.Final
Method org.hibernate.mapping.DenormalizedTable.createForeignKeys() concat fk.getName() and Integer.toHexString( getName().hashCode()
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Also have problem with too long FK name with Hibernate 4.2.2.Final
Method org.hibernate.mapping.DenormalizedTable.createForeignKeys() concat fk.getName() and Integer.toHexString( getName().hashCode()
createForeignKey(
fk.getName() + Integer.toHexString( getName().hashCode() ),
fk.getColumns(),
fk.getReferencedEntityName()
);
In my case, it results in a FK name of 36 chars !
Stack trace :
DenormalizedTable.createForeignKeys() line: 51
LocalSessionFactoryBuilder(Configuration).secondPassCompileForeignKeys(Table, Set<ForeignKey>) line: 1703
LocalSessionFactoryBuilder(Configuration).originalSecondPassCompile() line: 1655
LocalSessionFactoryBuilder(Configuration).secondPassCompile() line: 1369
LocalSessionFactoryBuilder(Configuration).buildSessionFactory(ServiceRegistry) line: 1756
LocalSessionFactoryBuilder(Configuration).buildSessionFactory() line: 1840
LocalSessionFactoryBuilder.buildSessionFactory() line: 247