Esempio n. 1
0
 /**
  * delete
  *
  * Delete a model object from the underlying database. This method will
  * also clear the model cache of the specified model so future lookups
  * would mean database lookups or NULL. 
  *
  * Returns:
  * <SqlExecutor> — an instance of SqlExecutor which can perform the
  * actual execution (via ::execute())
  */
 protected static function delete(Model\ModelBase $model)
 {
     Model\ModelInstanceManager::uncache($model);
     $connection = static::getManager()->getConnection($model);
     $stmt = $connection->getCompiler()->compileDelete($model);
     return $connection->getExecutor($stmt);
 }