Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-6396

Filter wizard/Database Collector should correctly identify catalog, schema, and tables even when tables contain dots (".") in the name

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Critical
    • 3.2.0.CR1, 3.3.0.M1
    • 3.1.0.GA
    • hibernate
    • None

    Description

      The DefaultDatabaseCollector uses StringHelper.qualifier(String) to determine the catalog and schema name for each table, given the fully-qualified name.

      StringHelper.qualifier() assumes that everything proceeding the final "." in the fully-qualified name represents the qualifier.

      This assumption breaks down if a table contains a dot in the name. This is found to be the case when working with MetaMatrix (and possibly Teiid).

      The result is that the Filter Wizard will generate invalid filters, based on the incorrect naming of catalog and schema for each table.

      As a fix, I modified DefaultDatabaseCollector to form the qualifier by using the known catalog and schema, rather than by using the StringHelper.qualifier method. I rebuilt tools and verified that this fixed the problem when working with MetaMatrix.

      This may be better addressed by changing the behavior of StringHelper.qualifier() itself.

      See forum discussion for details.

      Patch attached.

      Attachments

        1. JBIDE-6396.txt
          10 kB
        2. JBIDE-tablename-with-dots-patch-mpw.txt
          1 kB
        3. Patch2.zip
          3 kB
        4. patch3.txt
          19 kB

        Activity

          People

            dgeraskov Dmitry Geraskov (Inactive)
            mwalker1@redhat.com Michael Walker (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: