Bug #66384 Can't unckeck column in foreign keys
Submitted: 14 Aug 2012 17:04 Modified: 17 Aug 2012 12:51
Reporter: none none Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.2.42 OS:Windows (Microsoft Windows 7 Service Pack 1 (build 7601), 64-bit)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[14 Aug 2012 17:04] none none
Description:
I can't uncheck column in foreign keys definition, ihave to delete key and create it again... as well as behavior is strange, why  do you have to open dialog for column select when i click on checkbox?

----- Developer Notes -----

MySQL Workbench CE for Windows version 5.2.42  revision 9752
Configuration Directory: C:\Users\SendiMyrkr\AppData\Roaming\MySQL\Workbench
Data Directory: C:\Program Files (x86)\MySQL\MySQL Workbench 5.2 CE
Cairo Version: 1.8.8
OS: Microsoft Windows 7  Service Pack 1 (build 7601), 64-bit
CPU: 2x Intel(R) Pentium(R) CPU        P6100  @ 2.00GHz, 7.9 GiB RAM
Active video adapter (0): ATI Mobility Radeon HD 5400 Series
Installed video RAM: 512 MB
Current video mode: 1366 x 768 x 4294967296 colors
Used bit depth: 32
Driver version: 8.961.0.0
Installed display drivers: aticfx64.dll,aticfx64.dll,aticfx64.dll,aticfx32,aticfx32,aticfx32,atiumd64.dll,atidxx64.dll,atidxx64.dll,atiumdag,atidxx32,atidxx32,atiumdva,atiumd6a.cap,atitmm64.dll
Active video adapter (1): VNC Mirror Driver
Installed video RAM: 0 MB
Current video mode: 1024 x 768 x 4294967296 colors
Used bit depth: 32
Driver version: 1.8.0.0
Installed display drivers: NULL
Current user language: Čeština (Česká republika)

How to repeat:
write FK name, choose table, check box... try it uncheck
[15 Aug 2012 18:56] Rafael Antonio Bedoy Torres
Hello,

where are you creating the table, on SQL Editor section or on Model section?

Can you please add a step by step list of what you did?

Thanks!
[15 Aug 2012 21:51] none none
It's in model section. I created table, define columns and click to tab "Foreign keys" than i write name of key, choose table, check box by column and than it's opened select of columns, i guess that this bad behavior cause table select doesn't do this. And every time when i want uncheck column so i can't cause is probably again checked and opened select for column choose. I hope you understand me, english doesn't my native language... :) model has 31+ tables and 5+ diagrams...
[16 Aug 2012 15:48] Evert Harmeling
I have the same issue it's best explained if you want to create a many-to-many table for example `user_organization` which includes `user_id` and `organization_id`. 
When you want to define the foreign keys it's no problem for `user_id` as it seems to go the top possible related column. But when you try to create a foreign key for `organization_id` it's wants to also check the `user_id` column as a related column which then CAN'T be unchecked. It looks like the select box in the 'Referenced Column' has no 'null' value and therefor can't be deselected which results in a checkbox which always gets checked.

Possible fix:
Probably add a null value to the select box...
[16 Aug 2012 16:04] Evert Harmeling
Workbench screenshot

Attachment: workbench_bug_66384.PNG (image/png, text), 23.66 KiB.

[17 Aug 2012 8:49] Evert Harmeling
Temporary workaround:
Changing the order of the columns when defining the foreign keys, so that the key you want to relate to is on top of the list everytime you want the define a foreign key.
[17 Aug 2012 12:51] Alfredo Kojima
Duplicate of bug #66171