/** * 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 UserSc (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->setEmail($this->email); $copyObj->setProfile($this->profile); $copyObj->setPassword($this->password); $copyObj->setCreatedAt($this->created_at); $copyObj->setFlag($this->flag); $copyObj->setTokenSession($this->token_session); 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->getTreeScsRelatedByUserId() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addTreeScRelatedByUserId($relObj->copy($deepCopy)); } } foreach ($this->getTreeScsRelatedByResponsableId() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addTreeScRelatedByResponsableId($relObj->copy($deepCopy)); } } foreach ($this->getTreeUsers() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addTreeUser($relObj->copy($deepCopy)); } } foreach ($this->getIndicatorsScs() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addIndicatorsSc($relObj->copy($deepCopy)); } } foreach ($this->getGrupoTrabajoScs() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addGrupoTrabajoSc($relObj->copy($deepCopy)); } } foreach ($this->getDetalleGrupoTrabajoScs() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addDetalleGrupoTrabajoSc($relObj->copy($deepCopy)); } } foreach ($this->getSolicitudGrupoTrabajoScs() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addSolicitudGrupoTrabajoSc($relObj->copy($deepCopy)); } } foreach ($this->getAsignacionScs() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addAsignacionSc($relObj->copy($deepCopy)); } } foreach ($this->getDataIndicadoress() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addDataIndicadores($relObj->copy($deepCopy)); } } } // if ($deepCopy) $copyObj->setNew(true); $copyObj->setId(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 GrupoTrabajoSc (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->setName($this->name); $copyObj->setOwnerId($this->owner_id); $copyObj->setFlag($this->flag); $copyObj->setCreateAt($this->create_at); $copyObj->setUpdateAt($this->update_at); 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->getTreeScs() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addTreeSc($relObj->copy($deepCopy)); } } foreach ($this->getDetalleGrupoTrabajoScs() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addDetalleGrupoTrabajoSc($relObj->copy($deepCopy)); } } foreach ($this->getSolicitudGrupoTrabajoScs() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addSolicitudGrupoTrabajoSc($relObj->copy($deepCopy)); } } foreach ($this->getAsignacionScs() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addAsignacionSc($relObj->copy($deepCopy)); } } } // if ($deepCopy) $copyObj->setNew(true); $copyObj->setId(NULL); // this is a auto-increment column, so set to default value }