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;
    }