Bug #61113 When multi-select deleting, do not delete relationships if tables are kept
Submitted: 10 May 2011 9:12 Modified: 11 Jan 2013 1:05
Reporter: Craig Fowler Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S4 (Feature request)
Version:5.2.33 OS:Linux (Ubuntu 10.10)
Assigned to: CPU Architecture:Any
Tags: delete, model

[10 May 2011 9:12] Craig Fowler
Description:
In modeling mode, if a large selection is dragged around a number of model objects (such as tables and relationships) and those objects are then deleted, a number of prompts appear asking whether to keep or delete those objects from the model.

At the moment in this scenario, the relationship lines are included in that request for deletion and those relationships are deleted.  This happens regardless of whether I choose to 'keep' the tables and foreign keys in those prompts or whether I choose to 'delete' them.

Could I request that - if the user chooses to 'keep' the tables that they are deleting - then any relationships are not actually deleted.

The use case that triggered this request was breaking a diagram (that had become too large/monolithic) apart into two diagrams, I wanted to remove ~ ½ of the objects from the diagram and place them on a new one.  I drag-selected around the objects to remove from the diagram, removed them (with 'keep objects' and 'keep foreign keys') but when I then placed them on a new diagram all of the relationship lines were gone.

--

Workaround I am using for now: delete the tables individually without drag-selecting.  The relationships are not selected for deletion and are preserved.

How to repeat:
* Create a diagram with a few tables and relationships on it.

* Use a drag-box selection to select a subset of the objects on that diagram and right-click delete those objects.

* Reply 'keep' to the prompts about keeping tables and foreign keys.

* Place those same objects on a new diagram (or even back onto the original diagram) by dragging them from the schema pane.

The relationship lines do not appear because they have been deleted.
[11 May 2011 11:56] Valeriy Kravchuk
What OS do you use? 

I do not see this problem with my .mwb files on Windows XP while deleting 2 tables related by > 1 FKs from the diagram and keeping them in the model.
[11 May 2011 12:02] Craig Fowler
Sorry, forgot to fill that field out.  Debian Testing/64-bit using the Ubuntu 10.10 .deb package.
[17 May 2011 7:30] Valeriy Kravchuk
Verified on Ubuntu 10.04. 

With the .mwb uploaded in private later, only 1 of numerous relationships left after deleting 3 tables and clicking "Keep" every time...
[11 Jan 2013 1:05] Philip Olson
Fixed as of the upcoming MySQL Workbench 5.2.46 release, and here's the changelog entry:

After selecting multiple objects and choosing "delete", then choosing
"keep" when prompted to delete or keep the selected objects, the
relationship lines were still deleted. MySQL Workbench now asks if the
relationship columns should be deleted or kept.

Thank you for the bug report.