/** * * @param sfDoctrineRecord $review * @return PerformanceReview */ public function saveReview(sfDoctrineRecord $review) { try { $review->save(); $review->refresh(); return $review; //@codeCoverageIgnoreStart } catch (Exception $e) { throw new DaoException($e->getMessage(), $e->getCode(), $e); } //@codeCoverageIgnoreEnd }
/** * * @param sfDoctrineRecord $kpi * @return \sfDoctrineRecord * @throws DaoException */ public function saveKpi(sfDoctrineRecord $kpi) { try { if ($kpi->getDefaultKpi() > 0) { $query = Doctrine_Query::create()->update('Kpi k')->set('default_kpi', 'null'); $query->execute(); } $kpi->save(); $kpi->refresh(); return $kpi; //@codeCoverageIgnoreStart } catch (Exception $e) { throw new DaoException($e->getMessage(), $e->getCode(), $e); } //@codeCoverageIgnoreEnd }
public function refresh($deep = false) { return parent::refresh($deep)->clearCache(); }