0
À l'étude

New Oracle physical data model "from SQL" requires columns to be listed for the referenced table

Aner Perez il y a 1 an mis à jour par Jarosław Błąd (CEO) il y a 1 an 1

When creating a new model from an existing SQL DDL script (i.e. Content: "from SQL" is selected), the import fails if the table has a foreign key constraint with no columns listed on the foreign table.  In that situation it should use the primary key for the referenced table as the referenced columns.  Instead I received a cryptic error of ERROR:No more content.


A sample DDL that demonstrates this behavior is:


CREATE TABLE person (
  id NUMBER(6) NOT NULL,
  first_name VARCHAR2(30) NOT NULL,
  last_name VARCHAR2(30) NOT NULL,
  changed_by NUMBER(6) NOT NULL,
  CONSTRAINT person#PK
    PRIMARY KEY (id),
  CONSTRAINT person#person#FK
    FOREIGN KEY (changed_by)
    REFERENCES person
);

I would need to change the last line to say REFERENCES person (id) for this DDL to be accepted.  This DDL was from a very old Oracle database and I selected 11c/12g as the version.

À l'étude

Thank you for reporting the issue. We will investigate this.

Best regards,

Jarosław