def _dict_recursive(cls, value: Any):
        """Recursively serialize the relationship object(s).

        Args:
            value: The value to serialize.

        Returns:
            The serialized value.
        """
        if hasattr(value, "dict"):
            return value.dict()
        if isinstance(value, list):
            return [cls._dict_recursive(item) for item in value]
        return value
Recursively serialize the relationship object(s).

        Args:
            value: The value to serialize.

        Returns:
            The serialized value.
        
reflex/model.py