public function save() { // set date if (!(int) $this->getId()) { $this->getDao()->create(); } $this->update(); }