diff --git a/src/Metadata/Property/Factory/SerializerPropertyMetadataFactory.php b/src/Metadata/Property/Factory/SerializerPropertyMetadataFactory.php index 9fe3187b4bc..0c1f45f3530 100644 --- a/src/Metadata/Property/Factory/SerializerPropertyMetadataFactory.php +++ b/src/Metadata/Property/Factory/SerializerPropertyMetadataFactory.php @@ -200,8 +200,7 @@ private function transformLinkStatus(ApiProperty $propertyMetadata, string $prop return $propertyMetadata; } - $collectionValueType = TypeHelper::getCollectionValueType($type); - $className = $collectionValueType ? TypeHelper::getClassName($collectionValueType) : TypeHelper::getClassName($type); + $className = $this->extractClassNameFromType($type); // if property is not a resource relation, don't set link status (as it would have no meaning) if (!$className || !$this->isResourceClass($className)) {