public function delete()
    {
        $query = $this->createQuery();
        $query->setAction('delete');
        $query->where($query->buildAndSet([$this->getTableKey(), '=', $this->id]));
        $result = $this->database->query($query);

        return $result ? true : false;
    }
public function delete()
    {
        $query = $this->createQuery();
        $query->setAction('delete');
        $query->where($query->buildAndSet([$this->getTableKey(), '=', $this->id]));
        $result = $this->database->query($query);

        return $result ? true : false;
    }
public function delete ( ) { $ query = $ this -> createQuery ( ) ; $ query -> setAction ( 'delete' ) ; $ query -> where ( $ query -> buildAndSet ( [ $ this -> getTableKey ( ) , '=' , $ this -> id ] ) ) ; $ result = $ this -> database -> query ( $ query ) ; return $ result ? true : false ; }
Deletes the current model from the database.

@return bool
Deletes the current model from the database .