Hi, there,
My apologies if this has been asked before, but I searched in the forum and couldn't find an answer. I'm trying to reverse-engineer a PDM by extracting metadata from the Oracle data dictionary and importing it into PowerDesigner 16.5 (SP03) using the Excel import extension. At the moment, I am operating with some basic objects, and below are the tabs I've created:
- Table
- Table.Key
- Table.Column
- Table.Index
- Table.Index.Index Column
- Reference
- Reference.Reference Join
Everything seems to work correctly, except for one reference join that fails to import properly. I've narrowed down the case to the following: If the "Child Table Column" name is different from the "Parent Table Column," then the import function will create a new column object (with some made up name) instead of using the designated child one.
On the other hand, as long as the parent and child columns are homonyms, everything works without issue.
Here's a representative example:
Table:
Owner | Name |
---|
OWNER1 | MASTER |
OWNER1 | DETAIL |
Table.Key:
Parent | Name | Constraint Name | Primary |
---|
MASTER | PK_MASTER | PK_MASTER | True |
DETAIL | PK_DETAIL | PK_DETAIL | True |
Table.Column:
Parent | Name | Data Type | Mandatory | Primary |
---|
MASTER | ID | INTEGER | True | True |
MASTER | ParentID | INTEGER | False | False |
MASTER | StartDate | DATE | False | False |
DETAIL | ID | INTEGER | True | True |
DETAIL | Name | VARCHAR2(50) | True | False |
DETAIL | Description | VARCHAR2(1000) | False | False |
Reference:
Name | Code | Parent Table | Child Table | Foreign Key Constraint Name |
---|
FK_DETAIL_MASTER | FK_DETAIL_MASTER | MASTER | DETAIL | FK_DETAIL_MASTER |
FK_MASTER_MASTER | FK_MASTER_MASTER | MASTER | MASTER | FK_MASTER_MASTER |
Reference.Reference Join:
Parent | Parent Table Column | Child Table Column |
---|
FK_DETAIL_MASTER | MASTER.ID | DETAIL.ID |
FK_MASTER_MASTER | MASTER.ID | MASTER.ParentID |
I've highlighted above the offending object. In this case, the reference is to the same table (self-referential), but I've tried it to a different table. It always fails if the Child Table Column name is different from the Parent Table Column name.
Is there a way to make PowerDesigner correctly link the reference in such situations, or am I doing something wrong?
Best regards,
- j.