Exporting an index (through schema export, update, etc) inaccurately assumes that {{Dialect#qualifyIndexName}} indicates whether the *table* name should be used to qualify the index. Is that actually the case on some databases?
In any case, for H2 and HSQLDB (both dialects report true) that leads to problems exporting the index because the table name is not recognized as a schema name.
As an example of what I mean, from our {{org.hibernate.test.annotations.embedded.EmbeddedTest}} test: {noformat} 07:46:29,493 DEBUG SQL:109 - create table Car ( id bigint not null, brand varchar(255), producer varchar(255), since bigint not null, primary key (id) ) ... 07:46:29,503 DEBUG SQL:109 - create index Car.Car_idx on Car (since) 07:46:29,508 ERROR SchemaExport:458 - HHH000389: Unsuccessful: create index Car.Car_idx on Car (since) 07:46:29,509 ERROR SchemaExport:459 - Schema "CAR" not found; SQL statement:
create index Car.Car_idx on Car (since) [90079-145] ... {noformat}
|