Uploaded image for project: 'Teiid Designer'
  1. Teiid Designer
  2. TEIIDDES-1735

Importing DDL Tables containing FK with no column references to table reference does not set unique key

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 8.2
    • 8.2
    • Import/Export
    • None

    Description

      DDL allows creating an in-line FK constraint with an abbreviated Table reference which assumes the PK or UC on the table references same # columns as the FK. The example below results in the FK's Unique Key reference NOT getting set (NULL)

      // testOptionalFK
      CREATE FOREIGN TABLE T12 (
         g1e1 integer,
         g1e2 varchar,
         PRIMARY KEY(g1e1, g1e2)
      );
      
      CREATE FOREIGN TABLE T13 (
         g2e1 integer,
         g2e2 varchar,
         PRIMARY KEY(g2e1, g2e2),
         FOREIGN KEY (g2e1, g2e2) REFERENCES T12
      );
      

      Need to allow for this.

      Error is in the DdlImporter.createTeiidConstraint() method

      Attachments

        Activity

          People

            blafond Barry LaFond
            blafond Barry LaFond
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: