diff --git a/core/modules/hal/src/LinkManager/RelationLinkManager.php b/core/modules/hal/src/LinkManager/RelationLinkManager.php
index dc6486f..b3a37da 100644
--- a/core/modules/hal/src/LinkManager/RelationLinkManager.php
+++ b/core/modules/hal/src/LinkManager/RelationLinkManager.php
@@ -128,7 +128,7 @@ protected function writeCache($context = []) {
           foreach ($this->entityManager->getFieldDefinitions($entity_type->id(), $bundle) as $field_definition) {
             $relation_uri = $this->getRelationUri($entity_type->id(), $bundle, $field_definition->getName(), $context);
             $data[$relation_uri] = [
-              'entity_type' => $entity_type,
+              'entity_type' => $entity_type->id(),
               'bundle' => $bundle,
               'field_name' => $field_definition->getName(),
             ];
