Select does not load default value in Edit Action with relationship

Hello, Guys, I have a Select that when I enter the Edit Action it is not marking the default value that comes from the relationship. The relationship is being loaded normally and showing the value in the Select Label. I've already tried select with relationship and options and nothing. See the code as relationship:
Select::make('subpasta.parent.id')
    ->required()
    ->label(fn(Model $record): string => 'Pasta Principal: ' . $record->subpasta->parent->id)
    ->relationship(
            'subpasta.parent',
            'label',
            modifyQueryUsing: fn(Builder $query) => $query->whereNull('parent_id')
            )
    //->options(Categoria::query()->whereNull('parent_id')->pluck('label', 'id'))
    ->searchable()
    ->placeholder('Selecione uma pasta.')
    ->loadingMessage('Carregando. Aguarde...')
    ->noSearchResultsMessage('Sem registros...')
    ->searchPrompt('Selecione uma pasta.')
    ->searchingMessage('Procurando...')
    ->preload()
    ->live()
    ->columnSpanFull(),

The relationship is both belongsTo and it is working correctly, I tested it in tinker.
$sub1->subpasta->parent
= App\Models\Categoria {#7159
id: 5,
uuid: "0a3beef6-2d1c-46e0-af7e-915435c9fbec",
parent_id: null,
slug: "pasta-4",
label: "Pasta 4",

Does anyone know how to make this mark the default value correctly? Thanks.
image.png
Was this page helpful?