From: Jess Robinson Date: Thu, 12 Jun 2008 12:15:32 +0000 (+0000) Subject: Patch from ribasushi: Correctly graph self-referential constraints X-Git-Tag: v0.11008~310 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d51a158eda74b2f3813783984e03f62c42b64361;p=dbsrgits%2FSQL-Translator.git Patch from ribasushi: Correctly graph self-referential constraints --- diff --git a/lib/SQL/Translator/Producer/GraphViz.pm b/lib/SQL/Translator/Producer/GraphViz.pm index 8c57208..5ace4f2 100644 --- a/lib/SQL/Translator/Producer/GraphViz.pm +++ b/lib/SQL/Translator/Producer/GraphViz.pm @@ -422,8 +422,8 @@ sub produce { for my $i ( 0 .. $#tables ) { my $table1 = $tables[ $i ]; for my $j ( 0 .. $#tables ) { + next if $i == $j; my $table2 = $tables[ $j ]; - next if $table1 eq $table2; next if $done{ $table1 }{ $table2 }; $gv->add_edge( $table2, $table1 ); $done{ $table1 }{ $table2 } = 1;