/** * Sets contents of passed object to values from current object. * * If desired, this method can also make copies of all associated (fkey referrers) * objects. * * @param object $copyObj An object of Tipusactivitat (or compatible) type. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false) { $copyObj->setNom($this->nom); $copyObj->setSiteId($this->site_id); $copyObj->setActiu($this->actiu); if ($deepCopy) { // important: temporarily setNew(false) because this affects the behavior of // the getter/setter methods for fkey referrer objects. $copyObj->setNew(false); foreach ($this->getActivitatss() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addActivitats($relObj->copy($deepCopy)); } } } // if ($deepCopy) $copyObj->setNew(true); $copyObj->setIdtipusactivitat(NULL); // this is a auto-increment column, so set to default value }
/** * Sets contents of passed object to values from current object. * * If desired, this method can also make copies of all associated (fkey referrers) * objects. * * @param object $copyObj An object of Cicles (or compatible) type. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false) { $copyObj->setNom($this->nom); $copyObj->setImatge($this->imatge); $copyObj->setPdf($this->pdf); $copyObj->setTcurt($this->tcurt); $copyObj->setDcurt($this->dcurt); $copyObj->setTmig($this->tmig); $copyObj->setDmig($this->dmig); $copyObj->setTcomplet($this->tcomplet); $copyObj->setDcomplet($this->dcomplet); $copyObj->setExtingit($this->extingit); $copyObj->setSiteId($this->site_id); $copyObj->setActiu($this->actiu); if ($deepCopy) { // important: temporarily setNew(false) because this affects the behavior of // the getter/setter methods for fkey referrer objects. $copyObj->setNew(false); foreach ($this->getActivitatss() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addActivitats($relObj->copy($deepCopy)); } } } // if ($deepCopy) $copyObj->setNew(true); $copyObj->setCicleid(NULL); // this is a auto-increment column, so set to default value }