Menu

#67 Two FK not supported

V 3.8
open
E/R views (2)
5
2006-08-17
2006-08-17
Anonymous
No

Configuration : Druid 3.8
Linux WS3
Postgresql 8.0

When a table has two FK, only the last one is designed.

Discussion

  • GreyGeek

    GreyGeek - 2008-04-09

    Logged In: YES
    user_id=2058813
    Originator: NO

    In version 3.9 that is fixed, if it was broken, because it works for me in 3.9
    Using "{table}_{fields}" in the Options->General->Foreign Keys field will set them. Here is a cut&paste from the SQL preview for one of my tables on Oracle 10g (It also works in PostgreSQL 8.1):
    CREATE TABLE fsallocation
    (
    fsallocation_pk number,
    costcenter_fk number,
    fundingsource_fk number,
    Percentage number(5,2),
    CONSTRAINT fsallocation_pk primary key(fsallocation_pk),
    CONSTRAINT fsallocation_costcenter_fk foreign key(costcenter_fk) references costcenters(costcenters_pk),
    CONSTRAINT fsallocation_fundingsource_fk foreign key(fundingsource_fk) references fundingsource(fundingsource_pk)
    );

    CREATE INDEX fsallocationIDX1 ON fsallocation(costcenter_fk);
    CREATE INDEX fsallocationIDX2 ON fsallocation(fundingsource_fk);

     
  • GreyGeek

    GreyGeek - 2008-04-09

    Logged In: YES
    user_id=2058813
    Originator: NO

    In version 3.9 that is fixed, if it was broken, because it works for me in 3.9
    Using "{table}_{fields}" in the Options->General->Foreign Keys field will set them. Here is a cut&paste from the SQL preview for one of my tables on Oracle 10g (It also works in PostgreSQL 8.1):
    CREATE TABLE fsallocation
    (
    fsallocation_pk number,
    costcenter_fk number,
    fundingsource_fk number,
    Percentage number(5,2),
    CONSTRAINT fsallocation_pk primary key(fsallocation_pk),
    CONSTRAINT fsallocation_costcenter_fk foreign key(costcenter_fk) references costcenters(costcenters_pk),
    CONSTRAINT fsallocation_fundingsource_fk foreign key(fundingsource_fk) references fundingsource(fundingsource_pk)
    );

    CREATE INDEX fsallocationIDX1 ON fsallocation(costcenter_fk);
    CREATE INDEX fsallocationIDX2 ON fsallocation(fundingsource_fk);

     

Log in to post a comment.