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

Wrong Foreign Key reference when exporting Dynamic VDB

    Details

    • Steps to Reproduce:
      1. import the attached project
      2. right click the vdb, select Modeling -> Generate Dynamic VDB
      3. click Next, click Generate
      4. find the DDL for table SUPPLIER_PARTS, notice the FOREIGN KEY definitions

      Description

      When creating a dynamic VDB from an existing VDB, Foreign Key definitions use the wrong table in the REFERENCES clause. The reference table is the same as the one that contains this FK.
      For example, in the table SUPPLIER_PARTS, the following constraint is generated:

      CONSTRAINT FK_SPLIER_PRTS_SPLY FOREIGN KEY(SUPPLIER_ID) REFERENCES SUPPLIER_PARTS(SUPPLIER_ID)

      which is obviously wrong. The correct constrant definition should be:

      CONSTRAINT FK_SPLIER_PRTS_SPLY FOREIGN KEY(SUPPLIER_ID) REFERENCES SUPPLIER(SUPPLIER_ID)

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  blafond Barry LaFond
                  Reporter:
                  asmigala Andrej Smigala
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: