"Property type not supported in Livewire for property" when using custom casts

I have a json field on my model, where I use a custom class as a cast:

    protected $casts = [
        "hotel_texts" => HotelText::class,
    ];


This fields contains only 3 properties and I am displaying the form like this:

TextInput::make("hotel_texts.field1"),
TextInput::make("hotel_texts.field2"),
TextInput::make("hotel_texts.field3"),


This worked in v2 without any problems, now in v3 I get an error:

Property type not supported in Livewire for property: [{"field1":"..


The HotelText implements the implements CastsAttributes, ArrayAccess interfaces. When changing the cast to array, it works as well.

Any ideas to get around this?
Was this page helpful?