Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-176

DbLoader: questionable use of DatabaseMetaData.getTables()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 1.1 [LEGACY]
    • 1.1 [LEGACY]
    • Core Library
    • None
    • HSQLDB 1.7.2, Mac OS X

    Description

      From DatabaseMetaData.getTables() JavaDocs:

      "...schemaPattern - a schema name pattern; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search

      tableNamePattern - a table name pattern; must match the table name as it is stored in the database..."

      Still DbLoader.getTables() method converted null table name and schema to "%" pattern... Technically this should work as if the pattern was "null" (and it works indeed on most DB's), still there is one where it does not - HSQLDB, and only version 1.7.2 (1.7.1 on Linux is OK, go figure).

      The solution - stop doing this conversion, and use null as it is - JDBC claims to support that.

      Attachments

        Activity

          People

            andrus Andrus Adamchik
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: