public function finishSave() { $this->syncReferences($this->referencesToUpdate); $this->referencesToUpdate = $this->referencesToDelete = array(); $this->getConnection()->commit(); }