Bug #40811 Relationship not drawn when placing relationship using existing columns (6)
Submitted: 18 Nov 2008 3:21 Modified: 27 Nov 2008 15:45
Reporter: Frank Quosdorf Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.0.27 OS:Windows (Vista Business)
Assigned to: CPU Architecture:Any
Tags: Relationship existing column diagram

[18 Nov 2008 3:21] Frank Quosdorf
Description:
After placing a relationship in an EER diagram using "Place a relationship using existing columns (6)" from the toolbox, the relationship is not drawn in the diagram. Closing and re-opening the diagram does not help, closing and re-opening Workbench does not help. The only thing that helps is to "delete" the table from the diagram and place it again in the diagram. The relationship is visible in the "Foreign Keys" tab of the table containing the foreign key, though.

Side note: Selecting to delete the table (any object) from a diagram even carries the danger of really deleting it as the dialog showing up asks whether the selected table shall be physically deleted, and with the YES button being enabled by default. Also, when actually "removing the table from the diagram", the table is still marked as "displayed in diagram" in the catalog.

How to repeat:
Create/open an EER diagram and place at least two tables on the diagram that do not have a relationship yet, but table A should have a primary key, and table B should have a column of the same name and type as the primary key in table A. Then, chose "Place a relationship using existing columns (6)" from the toolbar and pick the foreign key of table B first, then the primary key of table A. The foreign key will be properly set in table B (see "Foreign Keys" tab), but the diagram will not show the relationship.
[20 Nov 2008 14:51] MySQL Verification Team
I couldn't repeat or misunderstood the steps you have mentioned. It is possible to describe the steps one by one?. Thanks in advance.
[21 Nov 2008 0:15] Frank Quosdorf
sure:
(1) Create table A at least having a primary key column that will serve as foreign key in table B
(2) Create table B at least having a primary key and a second column of the same name and type as the primary key in table A 
(3) Place both tables in a new diagram
(4) Choose "Place a relationship using existing columns (6)" from the toolbar
(5) Pick the foreign key column of table B
(6) Pick the primary key column of table A
(7) The relationship connector will not be visible in the diagram (the relationship will be visible in the "Foreign Keys" tab of table B, though)

Hope that helps.
[27 Nov 2008 11:28] MySQL Verification Team
I downloaded the 5.0.27 SE version of Workbench and installed it on my Vista Home Premium SP1 edition. I could not reproduce the bug. Between steps 5 and 6 I had to click on "Pick Referenced Columns", but I don't think this was Frank's problem. 

I tried with a columns of INT NN and varchar(20) NN and the relationship was drawn immediately and appeared in the Foreign Keys tab as well.
[27 Nov 2008 15:45] MySQL Verification Team
I tried the same with the 5.0.27 OSS edition and was unable to verify the problem, the relationship was drawn immediately and appeared in the Foreign Keys tab as well.
[27 Nov 2008 15:57] MySQL Verification Team
While I was there I had a look at the Side note: from the original message as well, again on the OSS version on my version of Vista the Catalog gets updated (refreshed) and removes the table immediately after deleting the table.