Bug #60564 creating a relationship break model file
Submitted: 21 Mar 2011 11:10 Modified: 14 May 2011 10:05
Reporter: Francois Chastanet Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S1 (Critical)
Version:5.2.33 OS:Windows (XP SP3)
Assigned to: CPU Architecture:Any

[21 Mar 2011 11:10] Francois Chastanet
Description:
creating a relationship break model file
because the index and the foreign key have the same name

How to repeat:
I create 2 tables
Table 1 has one primary column (unsigned int AI not null)

I create the second table and I select the columns Tab of table2 which create me automatically a primary key table1_idtable1

Then I create an identifying 1:n from table2 to table1

The process create me :
- one column table1_idtable1 => OK
- one foreign key fk_table2_table1 => OK
- one index fk_table2_table1 => NOK

the index and the foreign key have the same name

moreover when I save the file, close Workbench an re-open it, the model file is damaged and the model can't be openned (maybe because the index and the foreign key have the same name)

Suggested fix:
the index name and the foreign key name must be different
[21 Mar 2011 11:19] Francois Chastanet
test file damaged

Attachment: test.mwb (application/octet-stream, text), 5.75 KiB.

[21 Mar 2011 15:35] Valeriy Kravchuk
I can conform problem with .mwb file uploaded on Mac OS X, but when I tried to create new model as described I've got no problems re-opening .mwb file.
[22 Mar 2011 12:46] Valeriy Kravchuk
Bug #60581 is probably a duplicate of this one.
[28 Mar 2011 8:09] Francois Chastanet
Thanks for your responsiveness
the 5.2.33b correct this
[14 May 2011 10:05] Valeriy Kravchuk
Fixed in 5.2.33b it seems.
[6 Jun 2011 22:33] Paul DuBois
Noted in 5.2.33b changelog.

Creating a relationship broke the model file due to the index and 
foreign key having the same name.