When starting session factoring with mode "allow schema update" the database is inspected.
Table structures are queried within correct schema and catalog. But foreign key constraints and indexes were not. If a index/foreign key is defined in another schema at the same sql server, the index/foreign key is not created in the current schema.
The fix is very easy.
org.hibernate.cfg.Configuration (revision 20769), method generateSchemaUpdateScript(Dialect, DatabaseMetadata):
In line 1174 und 1175 use default schema und catalog if not specified for the table. This metadata is used for table structures.
Copy these 2 lines to 1217 und 1218 where the default schema and catalog is not used when not specified for the table. This metadata is used for foreign key and indexes.
the explained patch
Bulk closing stale resolved issues