| The database schema update fails on a Microsoft SQL-Server 2008 (and probably newer versions and other database types too) if the database name contains a hyphen. In that case the SQL-Server expects the database name part inside the full qualified table name to be quoted. Example: Does not work: alter table serie-m.paul.TEST add [C1] varchar(255) Works: alter table "serie-m".paul.TEST add [C1] varchar(255) Setting property hibernate.globally_quoted_identifiers=true does not help, at schema update the code in org.hibernate.mapping.Table#sqlAlterStrings (line 450) still gets the qualified table name wrong, because TableInformationImp#tableName provides it without quotes, likely because its' identifierHelper (which has NormalizingIdentifierHelperImpl#globallyQuoteIdentifiers = true) is not used at #getName(). Attached test case can be used to reproduce the problem, after adapting the settings to connect to a Microsoft SQL-Server with a hyphen in the database name. |