/** * 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 Ordencompra (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->setIdproveedor($this->getIdproveedor()); $copyObj->setOrdencompraNofactura($this->getOrdencompraNofactura()); $copyObj->setOrdencompraFacturapdf($this->getOrdencompraFacturapdf()); $copyObj->setOrdencompraFecha($this->getOrdencompraFecha()); $copyObj->setOrdencompraImporte($this->getOrdencompraImporte()); $copyObj->setOrdencompraStatus($this->getOrdencompraStatus()); $copyObj->setOrdencompraFechaapagar($this->getOrdencompraFechaapagar()); 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->getOrdencompradetalles() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addOrdencompradetalle($relObj->copy($deepCopy)); } } foreach ($this->getTraspasos() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addTraspaso($relObj->copy($deepCopy)); } } //unflag object copy $this->startCopy = false; } // if ($deepCopy) if ($makeNew) { $copyObj->setNew(true); $copyObj->setIdordencompra(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 Articulovariante (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->setIdarticulo($this->getIdarticulo()); $copyObj->setArticulovarianteCodigobarras($this->getArticulovarianteCodigobarras()); $copyObj->setArticulovarianteCosto($this->getArticulovarianteCosto()); $copyObj->setArticulovariantePrecio($this->getArticulovariantePrecio()); $copyObj->setArticulovarianteIva($this->getArticulovarianteIva()); $copyObj->setArticulovarianteImagen($this->getArticulovarianteImagen()); 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->getArticulovariantereordens() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addArticulovariantereorden($relObj->copy($deepCopy)); } } foreach ($this->getArticulovariantevalors() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addArticulovariantevalor($relObj->copy($deepCopy)); } } foreach ($this->getOrdencompradetalles() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addOrdencompradetalle($relObj->copy($deepCopy)); } } //unflag object copy $this->startCopy = false; } // if ($deepCopy) if ($makeNew) { $copyObj->setNew(true); $copyObj->setIdarticulovariante(NULL); // this is a auto-increment column, so set to default value } }