diff --git a/src/Database/Table/Selection.php b/src/Database/Table/Selection.php index 3914e343d..6f1d25b8a 100644 --- a/src/Database/Table/Selection.php +++ b/src/Database/Table/Selection.php @@ -905,12 +905,12 @@ public function getReferencedTable(ActiveRow $row, ?string $table, string $colum } $key = $row[$column]; - $cacheKeys[$key] = TRUE; + $cacheKeys[] = $key; } if ($cacheKeys) { $selection = $this->createSelectionInstance($table); - $selection->where($selection->getPrimary(), array_keys($cacheKeys)); + $selection->where($selection->getPrimary(), $cacheKeys); } else { $selection = []; }