public function deleteModel(Model $model) { $tablename = $model->getTablename(); try { return $this->app['db']->delete($tablename)->where($model->ids())->execute() instanceof PDOStatement; } catch (PDOException $original) { $e = new AdapterException('An error occurred in the database adapter while deleting the ' . $model::modelName()); $e->setException($original); throw $e; } }