Skip to content

Commit

Permalink
[fix] current table forgotten when walking through junction tables
Browse files Browse the repository at this point in the history
Signed-off-by: Dorian Savina <[email protected]>
  • Loading branch information
dsavina committed Jun 26, 2017
1 parent d543c34 commit 35540bf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/SchemaAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,11 @@ private function getShortestPathWithoutCache($fromTable, $toTable)
if ($fk->getForeignTableName() == $currentTable) {
$foreignKeys[] = $fk;
$foreignKeys[] = $junctionFks[1];
$currentTable = $junctionFks[1]->getForeignTableName();
} else {
$foreignKeys[] = $junctionFks[1];
$foreignKeys[] = $fk;
$currentTable = $fk->getForeignTableName();
}
} else {
// @codeCoverageIgnoreStart
Expand Down

0 comments on commit 35540bf

Please sign in to comment.