DenormalizedTable FK constraint names can be too long

Description

and still not fixed in 4.2.2

union-subclass mapping generates foreign key constraint name too long
org.hibernate.mapping.DenormalizedTable.createForeignKeys() concatenates FK name (generated with parent class table name) with hash of the current table name.
It results in a > 30 chars long FK name.
Running SchemaExport.execute(Target.EXPORT, Type.CREATE) with simple Animal/Cat/Person mapping joined :

[main] 2013-05-24 12:23:11,023 DEBUG :
create table CAT (
ID numeric(18,0) not null,
OWNER numeric(18,0) not null,
COLOR varchar(255),
primary key (ID)
)
.[main] 2013-05-24 12:23:11,064 DEBUG :
create table PERSON (
ID numeric(18,0) not null,
NAME varchar(255),
primary key (ID)
)
[main] 2013-05-24 12:23:11,114 DEBUG :
alter table CAT
add constraint FK_sikm6d1tc9th079dp3bgfuxk7103b6
foreign key (OWNER)
references PERSON
[main] 2013-05-24 12:23:11,134 ERROR : HHH000389: Unsuccessful: alter table CAT add constraint FK_sikm6d1tc9th079dp3bgfuxk7103b6 foreign key (OWNER) references PERSON
[main] 2013-05-24 12:23:11,134 ERROR : GDS Exception. 335544351. unsuccessful metadata update
Name longer than database column size

Environment

Jdk 1.7
Firebird 2.5

Status

Assignee

Brett Meyer

Reporter

Aurelien DROUARD

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Major
Configure