Menu

#2831 (ok 3.1.3) Designer: compound key not shown

fixed
Interface (555)
1
2013-06-11
2009-02-05
Wagner Luis
No

Tables with combined Primary Keys are displaying only one column as Primary on Designer mode. I attached an screenshot with appointments.

Discussion

  • Wagner Luis

    Wagner Luis - 2009-02-05

    Appointments

     
  • Marc Delisle

    Marc Delisle - 2009-02-09

    This can be fixed with this patch, please try it; however I wonder what's the best thing to do, as the rest of the Designer code does not support creating a relation with such a compounded key. Tell me your opinion.

    Index: pmd_common.php

    --- pmd_common.php (revision 12226)
    +++ pmd_common.php (copie de travail)
    @@ -218,8 +218,10 @@
    if ($unique_only && ! $index->isUnique()) {
    continue;
    }
    - $column = key($index->getColumns());
    - $keys[$schema . '.' .$table . '.' . $column] = 1;
    + $columns = $index->getColumns();
    + foreach ($columns as $column_name => $dummy) {
    + $keys[$schema . '.' .$table . '.' . $column_name] = 1;
    + }
    }
    }

     
  • Marc Delisle

    Marc Delisle - 2009-02-09
    • assigned_to: nobody --> lem9
     
  • Wagner Luis

    Wagner Luis - 2009-02-10
    • priority: 5 --> 1
    • status: open --> closed-fixed
     
  • Wagner Luis

    Wagner Luis - 2009-02-10

    Thanks, now it's fixed.

    About your question, I'm not the best guy to answer because I'm not a PMA developer. But, my intention in resolve this bug was only cosmetic. The designer visual it's better now and if I need print my database design, I'll understand better what I did. Finally, I think that this fix should go to release.

    Thank you a lot more a time and sorry by my horrible english.

     
  • Marc Delisle

    Marc Delisle - 2009-02-10

    Thanks for the feedback. I'll commit the fix later today. Please do not close this tracker entry, we close it only when the corresponding release is published.

     
  • Marc Delisle

    Marc Delisle - 2009-02-10
    • priority: 1 --> 5
    • status: closed-fixed --> open-accepted
     
  • Wagner Luis

    Wagner Luis - 2009-02-10

    Ok, sorry. It was my first bug report, I didn't know. :)

     
  • Marc Delisle

    Marc Delisle - 2009-02-10

    Fixed in subversion, thanks for reporting.

     
  • Marc Delisle

    Marc Delisle - 2009-02-10
    • priority: 5 --> 1
    • summary: Designer: tables with combined PK aren't displaying correct --> (ok 3.1.3) Designer: compounded key not shown
    • status: open-accepted --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2009-02-10
    • summary: (ok 3.1.3) Designer: compounded key not shown --> (ok 3.1.3) Designer: compound key not shown
     
  • Marc Delisle

    Marc Delisle - 2009-02-28
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed
     
MongoDB Logo MongoDB