public function delete()
    {
        Manager::getInstance()->get($this)->refreshRelations();
        $pmk = $this->getPrimaryKey();
        $sql = Sql::createSql($this->getAdapter())
            ->delete($this->getTableName())
            ->where(["{$pmk} = :id" => [':id' => $this->$pmk]]);
        $event = new Delete([
            'primaryKey' => $this->$pmk,
            'abort' => false
        ]);
        $this->getEventManager()->trigger(Delete::BEFORE_DELETE, $this, $event);

        if ($event->abort) {
            return false;
        }
        $result = $sql->execute();
        $this->getEventManager()->trigger(Delete::AFTER_DELETE, $event);
        return $result > 0;
    }