public function unlink(RecordInterface $record): self
    {
        $this->loadData(true);

        //Ensure reference
        $record = $this->matchOne($record) ?? $record;

        foreach ($this->instances as $index => $linked) {
            if ($this->match($linked, $record)) {
                //Removing locally
                unset($this->instances[$index]);

                if (!in_array($linked, $this->scheduled, true) || !$this->autoload) {
                    //Scheduling unlink in db when we know relation OR partial mode is on
                    $this->unlinked[] = $linked;
                }
                break;
            }
        }

        $this->instances = array_values($this->instances);

        return $this;
    }