/** * 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 Usuario (or compatible) type. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) { $copyObj->setNombre($this->getNombre()); $copyObj->setmail($this->getmail()); $copyObj->setPassword($this->getPassword()); $copyObj->setAdmin($this->getAdmin()); $copyObj->setEducacion($this->getEducacion()); $copyObj->setLugar($this->getLugar()); $copyObj->setNota($this->getNota()); $copyObj->setEstado($this->getEstado()); if ($deepCopy && !$this->startCopy) { // important: temporarily setNew(false) because this affects the behavior of // the getter/setter methods for fkey referrer objects. $copyObj->setNew(false); // store object hash to prevent cycle $this->startCopy = true; foreach ($this->getAmistadsRelatedById_usuario() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addAmistadRelatedById_usuario($relObj->copy($deepCopy)); } } foreach ($this->getAmistadsRelatedByid_usuarioamigo() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addAmistadRelatedByid_usuarioamigo($relObj->copy($deepCopy)); } } foreach ($this->getCalificacions() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addCalificacion($relObj->copy($deepCopy)); } } foreach ($this->getComentarios() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addComentario($relObj->copy($deepCopy)); } } foreach ($this->getLibrosRelatedByUsuario_ult_acc() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addLibroRelatedByUsuario_ult_acc($relObj->copy($deepCopy)); } } foreach ($this->getLibrosRelatedById_usuario() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addLibroRelatedById_usuario($relObj->copy($deepCopy)); } } foreach ($this->getUsuario_interesess() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addUsuario_intereses($relObj->copy($deepCopy)); } } foreach ($this->getListas() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addLista($relObj->copy($deepCopy)); } } foreach ($this->getLibro_colaboradors() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addLibro_colaborador($relObj->copy($deepCopy)); } } foreach ($this->getLibro_versions() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addLibro_version($relObj->copy($deepCopy)); } } foreach ($this->getMensajesRelatedById_usuario_destinatario() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addMensajeRelatedById_usuario_destinatario($relObj->copy($deepCopy)); } } foreach ($this->getMensajesRelatedById_usuario_remitente() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addMensajeRelatedById_usuario_remitente($relObj->copy($deepCopy)); } } foreach ($this->getNotificacionsRelatedById_emisor() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addNotificacionRelatedById_emisor($relObj->copy($deepCopy)); } } foreach ($this->getNotificacionsRelatedById_receptor() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addNotificacionRelatedById_receptor($relObj->copy($deepCopy)); } } foreach ($this->getSolicitud_amistadsRelatedById_usuario_solicitado() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addSolicitud_amistadRelatedById_usuario_solicitado($relObj->copy($deepCopy)); } } foreach ($this->getSolicitud_amistadsRelatedById_usuario_solicitante() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addSolicitud_amistadRelatedById_usuario_solicitante($relObj->copy($deepCopy)); } } foreach ($this->getSolicituds() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addSolicitud($relObj->copy($deepCopy)); } } foreach ($this->getPostulantess() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addPostulantes($relObj->copy($deepCopy)); } } //unflag object copy $this->startCopy = false; } // if ($deepCopy) if ($makeNew) { $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 Libro (or compatible) type. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) { $copyObj->setNombre($this->getNombre()); $copyObj->setFecha($this->getFecha()); $copyObj->setId_genero($this->getId_genero()); $copyObj->setAutor($this->getAutor()); $copyObj->setImage($this->getImage()); $copyObj->setSinopsis($this->getSinopsis()); $copyObj->setFecha_ult_acc($this->getFecha_ult_acc()); $copyObj->setHora_ult_acc($this->getHora_ult_acc()); $copyObj->setUsuario_ult_acc($this->getUsuario_ult_acc()); $copyObj->setId_privacidad($this->getId_privacidad()); $copyObj->setEs_editable($this->getEs_editable()); $copyObj->setId_usuario($this->getId_usuario()); $copyObj->setDebaja($this->getDebaja()); $copyObj->setEstado($this->getEstado()); if ($deepCopy && !$this->startCopy) { // important: temporarily setNew(false) because this affects the behavior of // the getter/setter methods for fkey referrer objects. $copyObj->setNew(false); // store object hash to prevent cycle $this->startCopy = true; foreach ($this->getAudiolibros() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addAudiolibro($relObj->copy($deepCopy)); } } foreach ($this->getCalificacions() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addCalificacion($relObj->copy($deepCopy)); } } foreach ($this->getComentarios() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addComentario($relObj->copy($deepCopy)); } } foreach ($this->getLibro_colaboradors() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addLibro_colaborador($relObj->copy($deepCopy)); } } foreach ($this->getLibro_versions() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addLibro_version($relObj->copy($deepCopy)); } } foreach ($this->getSolicituds() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addSolicitud($relObj->copy($deepCopy)); } } foreach ($this->getSlider_maes() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addSlider_mae($relObj->copy($deepCopy)); } } foreach ($this->getPostulantess() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addPostulantes($relObj->copy($deepCopy)); } } foreach ($this->getClasificadoss() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addClasificados($relObj->copy($deepCopy)); } } //unflag object copy $this->startCopy = false; } // if ($deepCopy) if ($makeNew) { $copyObj->setNew(true); $copyObj->setId(NULL); // this is a auto-increment column, so set to default value } }