diff --git a/src/core/Directus/Database/TableGateway/RelationalTableGateway.php b/src/core/Directus/Database/TableGateway/RelationalTableGateway.php index 88d7236ddf..f3fd506c6e 100644 --- a/src/core/Directus/Database/TableGateway/RelationalTableGateway.php +++ b/src/core/Directus/Database/TableGateway/RelationalTableGateway.php @@ -1892,7 +1892,8 @@ public function loadManyToOneRelationships($entries, $columns, array $params = [ foreach ($entries as &$parentRow) { if (array_key_exists($relationalColumnName, $parentRow)) { // @NOTE: Not always will be a integer - $foreign_id = (int)$parentRow[$relationalColumnName]; + // @NOTE: But what about UUIDS and slugs? + $foreign_id = (string)$parentRow[$relationalColumnName]; $parentRow[$relationalColumnName] = null; // "Did we retrieve the foreign row with this foreign ID in our recent query of the foreign table"? if (array_key_exists($foreign_id, $relatedEntries)) {