Example #1
0
 /**
  * @return bool
  * @throws \Exception
  */
 public function delete()
 {
     static::$db->setModel(get_class(new static()), static::$table);
     if (static::$db->delete($this->primaryKey, $this->data[$this->primaryKey])) {
         $this->isNewRow = true;
         return true;
     }
     return false;
 }