public function update(C3op_Projects_Project $p) { if (!isset($this->identityMap[$p])) { throw new C3op_Projects_ProjectMapperException('Object has no ID, cannot update.'); } $this->db->exec(sprintf('UPDATE projects_projects SET title = \'%s\' , client = %d , our_responsible = %d , responsible_at_client = %d , begin_date = \'%s\' , finish_date = \'%s\' , status = %d , value = %f , contract_nature = %d , area_activity = %d , overhead = %f , management_fee = %f , object = \'%s\' , summary = \'%s\' , observation = \'%s\' WHERE id = %d;', $p->GetTitle(), $p->GetClient(), $p->GetOurResponsible(), $p->GetResponsibleAtClient(), $p->GetBeginDate(), $p->GetFinishDate(), $p->GetStatus(), $p->GetValue(), $p->GetContractNature(), $p->GetAreaActivity(), $p->GetOverhead(), $p->GetManagementFee(), $p->GetObject(), $p->GetSummary(), $p->GetObservation(), $this->identityMap[$p])); }