Uploaded image for project: 'Hibernate ORM'
  1. HHH-10333

Schema validation: incorrect use of schema and catalog filters

    Details

    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Suitable for new contributors:
      Yes, likely
    • Last commented by a user?:
      true
    • Sprint:

      Description

      When performing the schema validation, if either a schema or a catalog is provided for an entity, the other value filter is assigned the empty string as value.

      However, as per [http://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html#getTables(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String[])], "null" and "empty string" have two different purposes, "null" meaning that the corresponding value should not be used to filter out the result set, while the empty string indicate to use the empty string to filter out the result set.

      It used to work on hibernate 3.3.2.

      Method to modify: org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.locateTableInNamespace

      A workaround is to specify both properties "hibernate.default_catalog" and "hibernate.default_schema".

        Attachments

          Issue links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: