public function save() { $this->beginTransaction(); try { if (!$this->getId()) { $this->getDao()->create(); } $this->update(); $this->commit(); } catch (\Exception $e) { $this->rollBack(); throw $e; } return $this; }