Example #1
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 Cliente (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->setCorreo($this->getCorreo());
     $copyObj->setDireccion($this->getDireccion());
     $copyObj->setTelefono($this->getTelefono());
     $copyObj->setCiudad($this->getCiudad());
     $copyObj->setObservacion($this->getObservacion());
     $copyObj->setPuntos($this->getPuntos());
     $copyObj->setNit($this->getNit());
     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->getTransaccions() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addTransaccion($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getFacturas() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addFactura($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getMovimientos() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addMovimiento($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
     }
 }
Example #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 TipoTransaccion (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->setDescripcion($this->getDescripcion());
     $copyObj->setCreatedAt($this->getCreatedAt());
     $copyObj->setUpdatedAt($this->getUpdatedAt());
     $copyObj->setCreatedBy($this->getCreatedBy());
     $copyObj->setUpdatedBy($this->getUpdatedBy());
     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->getTransaccions() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addTransaccion($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
     }
 }