src/Model/Serializer.php
private function resolveRealClassName(
        array $data,
        string $className
    ): string {
        if (!empty($data['@id'])) {
            $classMetadata = $this->mapping->tryGetClassMetadataById(
                $data['@id']
            );

            if ($classMetadata) {
                return $classMetadata->getModelName();
            }
        }

        // Real class name could also be retrieved from @type property.
        return $className;
    }
private function resolveRealClassName(
        array $data,
        string $className
    ): string {
        if (!empty($data['@id'])) {
            $classMetadata = $this->mapping->tryGetClassMetadataById(
                $data['@id']
            );

            if ($classMetadata) {
                return $classMetadata->getModelName();
            }
        }

        // Real class name could also be retrieved from @type property.
        return $className;
    }
If provided class name is abstract (a base class), the real class name (child class)
may be available in some data fields.