Skip to content

Commit

Permalink
[BUGFIX] Fixes finding missing records
Browse files Browse the repository at this point in the history
  • Loading branch information
dhoffmann1979 committed Aug 12, 2024
1 parent 21df295 commit 64b226d
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,21 @@ protected function findMissingTableRecords(JoinRowCollection $joinRowCollection)
$missingIdentifiers['local'] ?? [],
$joinRowCollection,
$this->localRepository,
'local'
);
$this->findMissingTableRecordsOnSide(
$missingIdentifiers['foreign'] ?? [],
$joinRowCollection,
$this->foreignRepository,
'foreign'
);
}

public function findMissingTableRecordsOnSide(
array $missingIdentifiers,
JoinRowCollection $joinRowCollection,
SingleDatabaseRepository $repository
SingleDatabaseRepository $repository,
string $side
): void {
foreach ($missingIdentifiers as $table => $joinTables) {
$identifiers = [];
Expand All @@ -102,7 +105,7 @@ public function findMissingTableRecordsOnSide(
foreach ($rows as $uid => $row) {
foreach ($identifiers[$uid] as $joinTable => $mmIds) {
foreach ($mmIds as $mmId) {
$joinRowCollection->amendRow($joinTable, $table, $mmId, 'foreign', $row);
$joinRowCollection->amendRow($joinTable, $table, $mmId, $side, $row);
}
}
}
Expand Down

0 comments on commit 64b226d

Please sign in to comment.