/**
  * 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 Slider_categ (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->setDescrp($this->getDescrp());
     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->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));
             }
         }
         //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
     }
 }
Esempio n. 2
0
 /**
  * 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
     }
 }