Relationship record not automatically created in resource View page action

I have an Order model with relationship of hasOne Training model.
After order creation, there is an action modal in the ViewOrder page that prompt user to enter remarks.
Upon action submission, I was hoping a related Training record would be created if not existed yet, else its remarks field should be updated but alas only updating existing record works. I've simplified the code below for review purpose.

Action::make('requestReviseOrder')
    ->form([
         TextArea::make('remarks')
    ])
    ->action(function (array $data): void     {
        $this->record->training()-  >update($data);
        $this->fillForm();
    }

Order class
public function training(): HasOne
    {
        return $this->hasOne(Training::class);
    }

Training class
public function order(): BelongsTo
    {
        return $this->belongsTo(Order::class);
    }
Was this page helpful?