I am trying to use your org.hibernate.tool.hbm2ddl.DatabaseMetadata in my own purposes. I found that it works more or less well when table names are unquoted. But it does not work correctly in case of using quoted identifiers. E.g. it does not work in HSQLDB. In method getTableMetadata you use methods storesUpperCaseIdentifiers and storesLowerCaseIdentifiers to uppercase or lowercase the table names. But it is not correctly for quoted identifiers.
Possibly we should have some tag (boolean quoted) which will specify using quoted identifiers in system and use the following methods instead: storesUpperCaseQuotedIdentifiers, storesLowerCaseQuotedIdentifiers and possibly supportsMixedCaseQuotedIdentifiers.
This is not a public API.
Are you sure that all other classes which use this class will work correctly in case quoted identifiers?
I've recognized exactly the same problems with PostgreSQL. Sure it is used by public APIs (as SchemaUpdate).
The problem is even slightly worse, as the table names that are read out of the table mappings still contain the quote sign. That means, even if your quoted name and the default behaviour of your database would match, the name would not be found.
But maybe this is the clue how to handle it:
ask the DatabaseMetaData about the quote sign (getIdentifierQuoteString)
if the table name embraced by quotes: use the stores*QuotedIdentifiers methods
else: business as usual
Would you mind to reopen this issue?