Bug #46582 N:M relationship table is placed far away from parent tables
Submitted: 6 Aug 2009 8:57 Modified: 28 Jun 2013 0:25
Reporter: Petr Burian Email Updates:
Status: Closed Impact on me:
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.1.16 OS:Any
Assigned to: CPU Architecture:Any
Tags: N:M, relation, table placement

[6 Aug 2009 8:57] Petr Burian
When I create N:M relationship (5) between two tables new-relationship table is placed far away from parent tables.

This issue appears only on huge database schemas.

How to repeat:
See atached picture. I created N:M relationship between two tables (highlighted with green color). New relationship table was created far away from those tables - see table higlighted with red color.
[6 Aug 2009 8:58] Petr Burian
N:M relationship table placement far away from parent tables

Attachment: m-n-rel.png (image/png, text), 215.09 KiB.

[6 Aug 2009 9:34] Valeriy Kravchuk
Thank you for the problem report. Can you send some schema big enough for this to reproduce?
[13 Aug 2009 4:31] Petr Burian
Oki, number of tables is *NOT* the issue. The problem is in layer object. Whenever a N:M relationship is created on tables where at least one of those tables is placed inside a layer, the problem appears.

See attached mwb diagram.
[13 Aug 2009 4:31] Petr Burian
Diagram to reproduce the problem.

Attachment: diagram.mwb (application/octet-stream, text), 6.66 KiB.

[13 Aug 2009 8:41] Susanne Ebrecht
Sorry but I am not able to follow you.

What are the exact steps to reproduce it?

1) Create two layers

2) Place some tables into both layers

3) link two tables of same layers together

4) link two tables of different layers together

Is that right?
[13 Aug 2009 9:01] Petr Burian
It is enough to have just one table in layer. The problem is mainly in Linux version but I can see it also in Windows version.

Oki, follow me...

Create a new ERR Diagram. Scroll to the middle of the page. Now create table_a and table_b. Create N:M realationship and you can see the N:M relationship table (table_a_has_table_b) is just between table_a and table_b (very close indeed).

Now create a layer and put a new table_c into it. Create N:M relationship table_b_has_table_c and you will see this new N:M table is placed far away from table_b and table_c. Right?

When I have a large ERR Diagram, my N:M relationship tables are miles from my source tables and I have always scroll diagram, find N:M relationship table and place it near source tables.
[13 Aug 2009 9:25] Susanne Ebrecht
Many thanks for your feedback.

Now I got it and you are right.

Verified as described by following description from previous comment ([13 Aug 11:01] Petr Burian)
[18 Jun 2013 20:11] Alfredo Kojima
Posted by developer:
Fixed in trunk
[28 Jun 2013 0:25] Philip Olson
Fixed as of the upcoming MySQL Workbench 6.0.3 release, and here's the changelog entry:

When adding a table to form a N:M relationship in a large EER Diagram,
the new N:M table was placed far away from the tables. This third table
is now added between the two other tables.

Thank you for the bug report.