Bug #50593 Multiple relations between two tables => difficult to read ER diagram
Submitted: 25 Jan 2010 16:14 Modified: 29 Jan 2018 10:59
Reporter: Pedro Melo Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:5.2.14 rev 4990 OS:Mac OS X (10.5.8)
Assigned to: CPU Architecture:Any

[25 Jan 2010 16:14] Pedro Melo
Description:
When I have two relations between the same tables, the lines representing the relations cross in the modeler graph.

How to repeat:
Create the two tables below, and then use wb to extract the model from an existing database.

If you move the two tables to be side-by-side, the lines cross. Some placements are ok, but side-by-side is wrong.

SET foreign_key_checks=0;

CREATE TABLE `cat_cursos` (
  `curso_id` integer NOT NULL auto_increment,
  `versao_id` integer NOT NULL,
  INDEX cat_cursos_idx_versao_id (`versao_id`),
  PRIMARY KEY (`curso_id`),
  CONSTRAINT `cat_cursos_fk_versao_id` FOREIGN KEY (`versao_id`) REFERENCES `cat_versoes_curso` (`versao_id`)
) ENGINE=InnoDB;

CREATE TABLE `cat_versoes_curso` (
  `versao_id` integer NOT NULL auto_increment,
  `curso_id` integer NOT NULL,
  `nome` varchar(200) NOT NULL,
  INDEX cat_versoes_curso_idx_curso_id (`curso_id`),
  PRIMARY KEY (`versao_id`),
  CONSTRAINT `cat_versoes_curso_fk_curso_id` FOREIGN KEY (`curso_id`) REFERENCES `cat_cursos` (`curso_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB;

SET foreign_key_checks=1;
[29 Jan 2018 10:59] Mike Lischke
Posted by developer:
 
I'm afraid this requires a bigger rework of the existing layouting engine and we plan no significant work on that in the foreseeable future.