source/Spiral/ORM/Entities/Relations/HasManyRelation.php
public function delete(RecordInterface $record): self
    {
        $this->loadData(true);
        $this->assertValid($record);

        foreach ($this->instances as $index => $instance) {
            if ($this->match($instance, $record)) {
                //Remove from save
                unset($this->instances[$index]);
                $this->deleteInstances[] = $instance;
                break;
            }
        }

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

        return $this;
    }
public function delete(RecordInterface $record): self
    {
        $this->loadData(true);
        $this->assertValid($record);

        foreach ($this->instances as $index => $instance) {
            if ($this->match($instance, $record)) {
                //Remove from save
                unset($this->instances[$index]);
                $this->deleteInstances[] = $instance;
                break;
            }
        }

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

        return $this;
    }
public function delete ( RecordInterface $ record ) : self { $ this -> loadData ( true ) ; $ this -> assertValid ( $ record ) ; foreach ( $ this -> instances as $ index => $ instance ) { if ( $ this -> match ( $ instance , $ record ) ) { //Remove from save unset ( $ this -> instances [ $ index ] ) ; $ this -> deleteInstances [ ] = $ instance ; break ; } } $ this -> instances = array_values ( $ this -> instances ) ; return $ this ; }
Delete one record, strict compaction, make sure exactly same instance is given.

@param RecordInterface $record

@return self

@throws RelationException
Delete one record strict compaction make sure exactly same instance is given .