src/ORM/Mappings/Type/UserType.php
public function deserialize($data, Context $context)
    {
        $data = $data->values();
        $object = new $this->className;

        $metadata = $context->getClassMetadata($this->className);

        foreach ($metadata->fieldMappings as $fieldMapping) {
            if (!isset($data[$fieldMapping->columnName])) {
                continue;
            }

            $setter = 'set' . ucfirst($fieldMapping->name);
            $object->$setter($fieldMapping->type->deserialize($data[$fieldMapping->columnName], $context));
        }

        return $object;
    }
public function deserialize($data, Context $context)
    {
        $data = $data->values();
        $object = new $this->className;

        $metadata = $context->getClassMetadata($this->className);

        foreach ($metadata->fieldMappings as $fieldMapping) {
            if (!isset($data[$fieldMapping->columnName])) {
                continue;
            }

            $setter = 'set' . ucfirst($fieldMapping->name);
            $object->$setter($fieldMapping->type->deserialize($data[$fieldMapping->columnName], $context));
        }

        return $object;
    }
@param UserTypeValue $data
@param Context $context

@return mixed