src/AbstractModel.php
public function delete(array $criteria = [])
    {
        $this->viewCheck(__FUNCTION__);

        $query = $this->buildDelete($criteria);

        $old = clone $this;
        if (!$this->beforeDelete($criteria))
            return false;

        if ($result = $this->run($query, $criteria))
            $this->next();

        if (!$this->afterDelete($old))
            return false;

        return $result;
    }
public function delete(array $criteria = [])
    {
        $this->viewCheck(__FUNCTION__);

        $query = $this->buildDelete($criteria);

        $old = clone $this;
        if (!$this->beforeDelete($criteria))
            return false;

        if ($result = $this->run($query, $criteria))
            $this->next();

        if (!$this->afterDelete($old))
            return false;

        return $result;
    }
public function delete ( array $ criteria = [ ] ) { $ this -> viewCheck ( __FUNCTION__ ) ; $ query = $ this -> buildDelete ( $ criteria ) ; $ old = clone $ this ; if ( ! $ this -> beforeDelete ( $ criteria ) ) return false ; if ( $ result = $ this -> run ( $ query , $ criteria ) ) $ this -> next ( ) ; if ( ! $ this -> afterDelete ( $ old ) ) return false ; return $ result ; }
delete, only when there is primary key
delete only when there is primary key