Skip to content

Commit 35540bf

Browse files
committed
[fix] current table forgotten when walking through junction tables
Signed-off-by: Dorian Savina <[email protected]>
1 parent d543c34 commit 35540bf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/SchemaAnalyzer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,11 @@ private function getShortestPathWithoutCache($fromTable, $toTable)
268268
if ($fk->getForeignTableName() == $currentTable) {
269269
$foreignKeys[] = $fk;
270270
$foreignKeys[] = $junctionFks[1];
271+
$currentTable = $junctionFks[1]->getForeignTableName();
271272
} else {
272273
$foreignKeys[] = $junctionFks[1];
273274
$foreignKeys[] = $fk;
275+
$currentTable = $fk->getForeignTableName();
274276
}
275277
} else {
276278
// @codeCoverageIgnoreStart

0 commit comments

Comments
 (0)