One last thing. I have 2 forms of two modules in one module. It works great while creating new record or editing existing one. But now I want to change save action in order to save a new record each time a field is modified. What should I do? In module actions I should alternate doSave, am I right?
After this? if ($this->isModified()) { if ($this->isNew()) { protected function doSave(PropelPDO $con) { (...) if ($this->isNew() ) { $this->modifiedColumns[] = PartnerPeer::ID; } // If this object has been modified, then save it to the database. if ($this->isModified()) { if ($this->isNew()) { $pk = PartnerPeer::doInsert($this, $con); $affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which // should always be true here (even though technically // BasePeer::doInsert() can insert multiple rows). $this->setId($pk); //[IMV] update autoincrement primary key $this->setNew(false); } else { $affectedRows += PartnerPeer::doUpdate($this, $con); } $this->resetModified(); // [HL] After being saved an object is no longer 'modified' } if ($this->collPartnerHistorias !== null) { foreach ($this->collPartnerHistorias as $referrerFK) { if (!$referrerFK->isDeleted()) { $affectedRows += $referrerFK->save($con); } } } if ($this->collUzytkowniks !== null) { foreach ($this->collUzytkowniks as $referrerFK) { if (!$referrerFK->isDeleted()) { $affectedRows += $referrerFK->save($con); } } } $this->alreadyInSave = false; } return $affectedRows; } // doSave() --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---