Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Auto Deriving Foreign Keys in PostgreSQL DB

    There appears to be a bug in SQLDSGenerator.getFieldsFromTable() when attempting to auto-derive foreign key associations. I have identified this within v11.1, which I realize is out of support. However, since I already did the groundwork and it is easily explained, I thought I would share it in case this issue persists in more recent versions of the framework, too.

    The issue is that foreign key associations are not identified. This is because the meta-data comes back from PostgreSQL with lower case keys in the data map:




    …whereas SmartClient is looking for upper case keys (i.e. PKTABLE_NAME & PKCOLUMN_NAME). It only looks for lower case keys when working with Informix drivers. Consequently, it cannot find the attributes it needs in the meta-data in lines 384 and 385. I expect similar failures to occur for FKCOLUMN_NAME on line 392, also:



    I hope that helps.

    #2
    Thank you for the report. In this case, we have ported the fix back as far as 11.0 because it was easy to do so; the fix will be present in tomorrow's 11.1 build if that is of interest to you.

    Regards,
    Isomorphic Software Support

    Comment

    Working...
    X