public function terminateEmployment(EmployeeTerminationRecord $employeeTerminationRecord) { try { $connection = Doctrine_Manager::getInstance()->getCurrentConnection(); $connection->beginTransaction(); /* Saving EmployeeTerminationRecord */ $employeeTerminationRecord->save(); /* Updating employee record */ $q = Doctrine_Query::create()->update('Employee')->set('termination_id', '?', $employeeTerminationRecord->getId())->where('empNumber = ?', $employeeTerminationRecord->getEmpNumber()); $q->execute(); $connection->commit(); return $employeeTerminationRecord; // @codeCoverageIgnoreStart } catch (Exception $e) { $connection->rollback(); throw new DaoException($e->getMessage(), $e->getCode(), $e); } // @codeCoverageIgnoreEnd }