Esempio n. 1
0
 /**
  * Deletes the current model.
  *
  * @return bool True on success, false otherwise.
  */
 public function delete()
 {
     $model = new DynamicFluentModel();
     $model->withModel($this);
     $primaryKeyValue = $this->columns[$this->getPrimaryKeyName()];
     $rowCount = $model->where($this->getPrimaryKeyName(), $primaryKeyValue)->deleteAll();
     return $rowCount > 0;
 }