command #1 migracion usuarios

parent 423189fc
...@@ -43,7 +43,7 @@ class McafeeUltimoProcesoMigracionTableMap extends TableMap ...@@ -43,7 +43,7 @@ class McafeeUltimoProcesoMigracionTableMap extends TableMap
$this->setUseIdGenerator(true); $this->setUseIdGenerator(true);
// columns // columns
$this->addPrimaryKey('mup_id', 'MupId', 'INTEGER', true, null, null); $this->addPrimaryKey('mup_id', 'MupId', 'INTEGER', true, null, null);
$this->addForeignKey('ultimo_umc_id', 'UltimoUmcId', 'INTEGER', 'usuario_mcafee', 'umc_id', true, null, null); $this->addForeignKey('ultimo_umc_id', 'UltimoUmcId', 'INTEGER', 'usuarios_mcafee_movistar_migrar', 'id', true, null, null);
$this->addColumn('mup_cantidad_procesados', 'MupCantidadProcesados', 'INTEGER', false, null, null); $this->addColumn('mup_cantidad_procesados', 'MupCantidadProcesados', 'INTEGER', false, null, null);
$this->addColumn('mup_cantidad_pendientes', 'MupCantidadPendientes', 'INTEGER', false, null, null); $this->addColumn('mup_cantidad_pendientes', 'MupCantidadPendientes', 'INTEGER', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null); $this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
...@@ -56,7 +56,7 @@ class McafeeUltimoProcesoMigracionTableMap extends TableMap ...@@ -56,7 +56,7 @@ class McafeeUltimoProcesoMigracionTableMap extends TableMap
*/ */
public function buildRelations() public function buildRelations()
{ {
$this->addRelation('UsuarioMcafee', 'AppBundle\\Model\\UsuarioMcafee', RelationMap::MANY_TO_ONE, array('ultimo_umc_id' => 'umc_id', ), null, null); $this->addRelation('UsuariosMcafeeMovistarMigrar', 'AppBundle\\Model\\UsuariosMcafeeMovistarMigrar', RelationMap::MANY_TO_ONE, array('ultimo_umc_id' => 'id', ), null, null);
} // buildRelations() } // buildRelations()
/** /**
......
...@@ -73,7 +73,6 @@ class UsuarioMcafeeTableMap extends TableMap ...@@ -73,7 +73,6 @@ class UsuarioMcafeeTableMap extends TableMap
$this->addRelation('EnvioEmail', 'AppBundle\\Model\\EnvioEmail', RelationMap::ONE_TO_MANY, array('umc_id' => 'umc_id', ), null, null, 'EnvioEmails'); $this->addRelation('EnvioEmail', 'AppBundle\\Model\\EnvioEmail', RelationMap::ONE_TO_MANY, array('umc_id' => 'umc_id', ), null, null, 'EnvioEmails');
$this->addRelation('McafeeTransaccion', 'AppBundle\\Model\\McafeeTransaccion', RelationMap::ONE_TO_MANY, array('umc_id' => 'umc_id', ), null, null, 'McafeeTransaccions'); $this->addRelation('McafeeTransaccion', 'AppBundle\\Model\\McafeeTransaccion', RelationMap::ONE_TO_MANY, array('umc_id' => 'umc_id', ), null, null, 'McafeeTransaccions');
$this->addRelation('McafeeTransaccionPendiente', 'AppBundle\\Model\\McafeeTransaccionPendiente', RelationMap::ONE_TO_MANY, array('umc_id' => 'umc_id', ), null, null, 'McafeeTransaccionPendientes'); $this->addRelation('McafeeTransaccionPendiente', 'AppBundle\\Model\\McafeeTransaccionPendiente', RelationMap::ONE_TO_MANY, array('umc_id' => 'umc_id', ), null, null, 'McafeeTransaccionPendientes');
$this->addRelation('McafeeUltimoProcesoMigracion', 'AppBundle\\Model\\McafeeUltimoProcesoMigracion', RelationMap::ONE_TO_MANY, array('umc_id' => 'ultimo_umc_id', ), null, null, 'McafeeUltimoProcesoMigracions');
$this->addRelation('Tracking', 'AppBundle\\Model\\Tracking', RelationMap::ONE_TO_MANY, array('umc_id' => 'umc_id', ), null, null, 'Trackings'); $this->addRelation('Tracking', 'AppBundle\\Model\\Tracking', RelationMap::ONE_TO_MANY, array('umc_id' => 'umc_id', ), null, null, 'Trackings');
} // buildRelations() } // buildRelations()
......
...@@ -83,6 +83,7 @@ class UsuariosMcafeeMovistarMigrarTableMap extends TableMap ...@@ -83,6 +83,7 @@ class UsuariosMcafeeMovistarMigrarTableMap extends TableMap
*/ */
public function buildRelations() public function buildRelations()
{ {
$this->addRelation('McafeeUltimoProcesoMigracion', 'AppBundle\\Model\\McafeeUltimoProcesoMigracion', RelationMap::ONE_TO_MANY, array('id' => 'ultimo_umc_id', ), null, null, 'McafeeUltimoProcesoMigracions');
} // buildRelations() } // buildRelations()
} // UsuariosMcafeeMovistarMigrarTableMap } // UsuariosMcafeeMovistarMigrarTableMap
...@@ -16,8 +16,8 @@ use \PropelPDO; ...@@ -16,8 +16,8 @@ use \PropelPDO;
use AppBundle\Model\McafeeUltimoProcesoMigracion; use AppBundle\Model\McafeeUltimoProcesoMigracion;
use AppBundle\Model\McafeeUltimoProcesoMigracionPeer; use AppBundle\Model\McafeeUltimoProcesoMigracionPeer;
use AppBundle\Model\McafeeUltimoProcesoMigracionQuery; use AppBundle\Model\McafeeUltimoProcesoMigracionQuery;
use AppBundle\Model\UsuarioMcafee; use AppBundle\Model\UsuariosMcafeeMovistarMigrar;
use AppBundle\Model\UsuarioMcafeeQuery; use AppBundle\Model\UsuariosMcafeeMovistarMigrarQuery;
abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Persistent abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Persistent
{ {
...@@ -77,9 +77,9 @@ abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Pe ...@@ -77,9 +77,9 @@ abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Pe
protected $updated_at; protected $updated_at;
/** /**
* @var UsuarioMcafee * @var UsuariosMcafeeMovistarMigrar
*/ */
protected $aUsuarioMcafee; protected $aUsuariosMcafeeMovistarMigrar;
/** /**
* Flag to prevent endless save loop, if this object is referenced * Flag to prevent endless save loop, if this object is referenced
...@@ -263,8 +263,8 @@ abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Pe ...@@ -263,8 +263,8 @@ abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Pe
$this->modifiedColumns[] = McafeeUltimoProcesoMigracionPeer::ULTIMO_UMC_ID; $this->modifiedColumns[] = McafeeUltimoProcesoMigracionPeer::ULTIMO_UMC_ID;
} }
if ($this->aUsuarioMcafee !== null && $this->aUsuarioMcafee->getUmcId() !== $v) { if ($this->aUsuariosMcafeeMovistarMigrar !== null && $this->aUsuariosMcafeeMovistarMigrar->getId() !== $v) {
$this->aUsuarioMcafee = null; $this->aUsuariosMcafeeMovistarMigrar = null;
} }
...@@ -429,8 +429,8 @@ abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Pe ...@@ -429,8 +429,8 @@ abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Pe
public function ensureConsistency() public function ensureConsistency()
{ {
if ($this->aUsuarioMcafee !== null && $this->ultimo_umc_id !== $this->aUsuarioMcafee->getUmcId()) { if ($this->aUsuariosMcafeeMovistarMigrar !== null && $this->ultimo_umc_id !== $this->aUsuariosMcafeeMovistarMigrar->getId()) {
$this->aUsuarioMcafee = null; $this->aUsuariosMcafeeMovistarMigrar = null;
} }
} // ensureConsistency } // ensureConsistency
...@@ -471,7 +471,7 @@ abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Pe ...@@ -471,7 +471,7 @@ abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Pe
if ($deep) { // also de-associate any related objects? if ($deep) { // also de-associate any related objects?
$this->aUsuarioMcafee = null; $this->aUsuariosMcafeeMovistarMigrar = null;
} // if (deep) } // if (deep)
} }
...@@ -601,11 +601,11 @@ abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Pe ...@@ -601,11 +601,11 @@ abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Pe
// method. This object relates to these object(s) by a // method. This object relates to these object(s) by a
// foreign key reference. // foreign key reference.
if ($this->aUsuarioMcafee !== null) { if ($this->aUsuariosMcafeeMovistarMigrar !== null) {
if ($this->aUsuarioMcafee->isModified() || $this->aUsuarioMcafee->isNew()) { if ($this->aUsuariosMcafeeMovistarMigrar->isModified() || $this->aUsuariosMcafeeMovistarMigrar->isNew()) {
$affectedRows += $this->aUsuarioMcafee->save($con); $affectedRows += $this->aUsuariosMcafeeMovistarMigrar->save($con);
} }
$this->setUsuarioMcafee($this->aUsuarioMcafee); $this->setUsuariosMcafeeMovistarMigrar($this->aUsuariosMcafeeMovistarMigrar);
} }
if ($this->isNew() || $this->isModified()) { if ($this->isNew() || $this->isModified()) {
...@@ -791,9 +791,9 @@ abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Pe ...@@ -791,9 +791,9 @@ abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Pe
// method. This object relates to these object(s) by a // method. This object relates to these object(s) by a
// foreign key reference. // foreign key reference.
if ($this->aUsuarioMcafee !== null) { if ($this->aUsuariosMcafeeMovistarMigrar !== null) {
if (!$this->aUsuarioMcafee->validate($columns)) { if (!$this->aUsuariosMcafeeMovistarMigrar->validate($columns)) {
$failureMap = array_merge($failureMap, $this->aUsuarioMcafee->getValidationFailures()); $failureMap = array_merge($failureMap, $this->aUsuariosMcafeeMovistarMigrar->getValidationFailures());
} }
} }
...@@ -898,8 +898,8 @@ abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Pe ...@@ -898,8 +898,8 @@ abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Pe
} }
if ($includeForeignObjects) { if ($includeForeignObjects) {
if (null !== $this->aUsuarioMcafee) { if (null !== $this->aUsuariosMcafeeMovistarMigrar) {
$result['UsuarioMcafee'] = $this->aUsuarioMcafee->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); $result['UsuariosMcafeeMovistarMigrar'] = $this->aUsuariosMcafeeMovistarMigrar->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
} }
} }
...@@ -1127,24 +1127,24 @@ abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Pe ...@@ -1127,24 +1127,24 @@ abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Pe
} }
/** /**
* Declares an association between this object and a UsuarioMcafee object. * Declares an association between this object and a UsuariosMcafeeMovistarMigrar object.
* *
* @param UsuarioMcafee $v * @param UsuariosMcafeeMovistarMigrar $v
* @return McafeeUltimoProcesoMigracion The current object (for fluent API support) * @return McafeeUltimoProcesoMigracion The current object (for fluent API support)
* @throws PropelException * @throws PropelException
*/ */
public function setUsuarioMcafee(UsuarioMcafee $v = null) public function setUsuariosMcafeeMovistarMigrar(UsuariosMcafeeMovistarMigrar $v = null)
{ {
if ($v === null) { if ($v === null) {
$this->setUltimoUmcId(NULL); $this->setUltimoUmcId(NULL);
} else { } else {
$this->setUltimoUmcId($v->getUmcId()); $this->setUltimoUmcId($v->getId());
} }
$this->aUsuarioMcafee = $v; $this->aUsuariosMcafeeMovistarMigrar = $v;
// Add binding for other direction of this n:n relationship. // Add binding for other direction of this n:n relationship.
// If this object has already been added to the UsuarioMcafee object, it will not be re-added. // If this object has already been added to the UsuariosMcafeeMovistarMigrar object, it will not be re-added.
if ($v !== null) { if ($v !== null) {
$v->addMcafeeUltimoProcesoMigracion($this); $v->addMcafeeUltimoProcesoMigracion($this);
} }
...@@ -1155,27 +1155,27 @@ abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Pe ...@@ -1155,27 +1155,27 @@ abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Pe
/** /**
* Get the associated UsuarioMcafee object * Get the associated UsuariosMcafeeMovistarMigrar object
* *
* @param PropelPDO $con Optional Connection object. * @param PropelPDO $con Optional Connection object.
* @param $doQuery Executes a query to get the object if required * @param $doQuery Executes a query to get the object if required
* @return UsuarioMcafee The associated UsuarioMcafee object. * @return UsuariosMcafeeMovistarMigrar The associated UsuariosMcafeeMovistarMigrar object.
* @throws PropelException * @throws PropelException
*/ */
public function getUsuarioMcafee(PropelPDO $con = null, $doQuery = true) public function getUsuariosMcafeeMovistarMigrar(PropelPDO $con = null, $doQuery = true)
{ {
if ($this->aUsuarioMcafee === null && ($this->ultimo_umc_id !== null) && $doQuery) { if ($this->aUsuariosMcafeeMovistarMigrar === null && ($this->ultimo_umc_id !== null) && $doQuery) {
$this->aUsuarioMcafee = UsuarioMcafeeQuery::create()->findPk($this->ultimo_umc_id, $con); $this->aUsuariosMcafeeMovistarMigrar = UsuariosMcafeeMovistarMigrarQuery::create()->findPk($this->ultimo_umc_id, $con);
/* The following can be used additionally to /* The following can be used additionally to
guarantee the related object contains a reference guarantee the related object contains a reference
to this object. This level of coupling may, however, be to this object. This level of coupling may, however, be
undesirable since it could result in an only partially populated collection undesirable since it could result in an only partially populated collection
in the referenced object. in the referenced object.
$this->aUsuarioMcafee->addMcafeeUltimoProcesoMigracions($this); $this->aUsuariosMcafeeMovistarMigrar->addMcafeeUltimoProcesoMigracions($this);
*/ */
} }
return $this->aUsuarioMcafee; return $this->aUsuariosMcafeeMovistarMigrar;
} }
/** /**
...@@ -1211,14 +1211,14 @@ abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Pe ...@@ -1211,14 +1211,14 @@ abstract class BaseMcafeeUltimoProcesoMigracion extends BaseObject implements Pe
{ {
if ($deep && !$this->alreadyInClearAllReferencesDeep) { if ($deep && !$this->alreadyInClearAllReferencesDeep) {
$this->alreadyInClearAllReferencesDeep = true; $this->alreadyInClearAllReferencesDeep = true;
if ($this->aUsuarioMcafee instanceof Persistent) { if ($this->aUsuariosMcafeeMovistarMigrar instanceof Persistent) {
$this->aUsuarioMcafee->clearAllReferences($deep); $this->aUsuariosMcafeeMovistarMigrar->clearAllReferences($deep);
} }
$this->alreadyInClearAllReferencesDeep = false; $this->alreadyInClearAllReferencesDeep = false;
} // if ($deep) } // if ($deep)
$this->aUsuarioMcafee = null; $this->aUsuariosMcafeeMovistarMigrar = null;
} }
/** /**
......
...@@ -11,7 +11,7 @@ use \PropelException; ...@@ -11,7 +11,7 @@ use \PropelException;
use \PropelPDO; use \PropelPDO;
use AppBundle\Model\McafeeUltimoProcesoMigracion; use AppBundle\Model\McafeeUltimoProcesoMigracion;
use AppBundle\Model\McafeeUltimoProcesoMigracionPeer; use AppBundle\Model\McafeeUltimoProcesoMigracionPeer;
use AppBundle\Model\UsuarioMcafeePeer; use AppBundle\Model\UsuariosMcafeeMovistarMigrarPeer;
use AppBundle\Model\map\McafeeUltimoProcesoMigracionTableMap; use AppBundle\Model\map\McafeeUltimoProcesoMigracionTableMap;
abstract class BaseMcafeeUltimoProcesoMigracionPeer abstract class BaseMcafeeUltimoProcesoMigracionPeer
...@@ -484,7 +484,7 @@ abstract class BaseMcafeeUltimoProcesoMigracionPeer ...@@ -484,7 +484,7 @@ abstract class BaseMcafeeUltimoProcesoMigracionPeer
/** /**
* Returns the number of rows matching criteria, joining the related UsuarioMcafee table * Returns the number of rows matching criteria, joining the related UsuariosMcafeeMovistarMigrar table
* *
* @param Criteria $criteria * @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
...@@ -492,7 +492,7 @@ abstract class BaseMcafeeUltimoProcesoMigracionPeer ...@@ -492,7 +492,7 @@ abstract class BaseMcafeeUltimoProcesoMigracionPeer
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows. * @return int Number of matching rows.
*/ */
public static function doCountJoinUsuarioMcafee(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) public static function doCountJoinUsuariosMcafeeMovistarMigrar(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
{ {
// we're going to modify criteria, so copy it first // we're going to modify criteria, so copy it first
$criteria = clone $criteria; $criteria = clone $criteria;
...@@ -519,7 +519,7 @@ abstract class BaseMcafeeUltimoProcesoMigracionPeer ...@@ -519,7 +519,7 @@ abstract class BaseMcafeeUltimoProcesoMigracionPeer
$con = Propel::getConnection(McafeeUltimoProcesoMigracionPeer::DATABASE_NAME, Propel::CONNECTION_READ); $con = Propel::getConnection(McafeeUltimoProcesoMigracionPeer::DATABASE_NAME, Propel::CONNECTION_READ);
} }
$criteria->addJoin(McafeeUltimoProcesoMigracionPeer::ULTIMO_UMC_ID, UsuarioMcafeePeer::UMC_ID, $join_behavior); $criteria->addJoin(McafeeUltimoProcesoMigracionPeer::ULTIMO_UMC_ID, UsuariosMcafeeMovistarMigrarPeer::ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con); $stmt = BasePeer::doCount($criteria, $con);
...@@ -535,7 +535,7 @@ abstract class BaseMcafeeUltimoProcesoMigracionPeer ...@@ -535,7 +535,7 @@ abstract class BaseMcafeeUltimoProcesoMigracionPeer
/** /**
* Selects a collection of McafeeUltimoProcesoMigracion objects pre-filled with their UsuarioMcafee objects. * Selects a collection of McafeeUltimoProcesoMigracion objects pre-filled with their UsuariosMcafeeMovistarMigrar objects.
* @param Criteria $criteria * @param Criteria $criteria
* @param PropelPDO $con * @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
...@@ -543,7 +543,7 @@ abstract class BaseMcafeeUltimoProcesoMigracionPeer ...@@ -543,7 +543,7 @@ abstract class BaseMcafeeUltimoProcesoMigracionPeer
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
*/ */
public static function doSelectJoinUsuarioMcafee(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) public static function doSelectJoinUsuariosMcafeeMovistarMigrar(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{ {
$criteria = clone $criteria; $criteria = clone $criteria;
...@@ -554,9 +554,9 @@ abstract class BaseMcafeeUltimoProcesoMigracionPeer ...@@ -554,9 +554,9 @@ abstract class BaseMcafeeUltimoProcesoMigracionPeer
McafeeUltimoProcesoMigracionPeer::addSelectColumns($criteria); McafeeUltimoProcesoMigracionPeer::addSelectColumns($criteria);
$startcol = McafeeUltimoProcesoMigracionPeer::NUM_HYDRATE_COLUMNS; $startcol = McafeeUltimoProcesoMigracionPeer::NUM_HYDRATE_COLUMNS;
UsuarioMcafeePeer::addSelectColumns($criteria); UsuariosMcafeeMovistarMigrarPeer::addSelectColumns($criteria);
$criteria->addJoin(McafeeUltimoProcesoMigracionPeer::ULTIMO_UMC_ID, UsuarioMcafeePeer::UMC_ID, $join_behavior); $criteria->addJoin(McafeeUltimoProcesoMigracionPeer::ULTIMO_UMC_ID, UsuariosMcafeeMovistarMigrarPeer::ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con); $stmt = BasePeer::doSelect($criteria, $con);
$results = array(); $results = array();
...@@ -576,19 +576,19 @@ abstract class BaseMcafeeUltimoProcesoMigracionPeer ...@@ -576,19 +576,19 @@ abstract class BaseMcafeeUltimoProcesoMigracionPeer
McafeeUltimoProcesoMigracionPeer::addInstanceToPool($obj1, $key1); McafeeUltimoProcesoMigracionPeer::addInstanceToPool($obj1, $key1);
} // if $obj1 already loaded } // if $obj1 already loaded
$key2 = UsuarioMcafeePeer::getPrimaryKeyHashFromRow($row, $startcol); $key2 = UsuariosMcafeeMovistarMigrarPeer::getPrimaryKeyHashFromRow($row, $startcol);
if ($key2 !== null) { if ($key2 !== null) {
$obj2 = UsuarioMcafeePeer::getInstanceFromPool($key2); $obj2 = UsuariosMcafeeMovistarMigrarPeer::getInstanceFromPool($key2);
if (!$obj2) { if (!$obj2) {
$cls = UsuarioMcafeePeer::getOMClass(); $cls = UsuariosMcafeeMovistarMigrarPeer::getOMClass();
$obj2 = new $cls(); $obj2 = new $cls();
$obj2->hydrate($row, $startcol); $obj2->hydrate($row, $startcol);
UsuarioMcafeePeer::addInstanceToPool($obj2, $key2); UsuariosMcafeeMovistarMigrarPeer::addInstanceToPool($obj2, $key2);
} // if obj2 already loaded } // if obj2 already loaded
// Add the $obj1 (McafeeUltimoProcesoMigracion) to $obj2 (UsuarioMcafee) // Add the $obj1 (McafeeUltimoProcesoMigracion) to $obj2 (UsuariosMcafeeMovistarMigrar)
$obj2->addMcafeeUltimoProcesoMigracion($obj1); $obj2->addMcafeeUltimoProcesoMigracion($obj1);
} // if joined row was not null } // if joined row was not null
...@@ -637,7 +637,7 @@ abstract class BaseMcafeeUltimoProcesoMigracionPeer ...@@ -637,7 +637,7 @@ abstract class BaseMcafeeUltimoProcesoMigracionPeer
$con = Propel::getConnection(McafeeUltimoProcesoMigracionPeer::DATABASE_NAME, Propel::CONNECTION_READ); $con = Propel::getConnection(McafeeUltimoProcesoMigracionPeer::DATABASE_NAME, Propel::CONNECTION_READ);
} }
$criteria->addJoin(McafeeUltimoProcesoMigracionPeer::ULTIMO_UMC_ID, UsuarioMcafeePeer::UMC_ID, $join_behavior); $criteria->addJoin(McafeeUltimoProcesoMigracionPeer::ULTIMO_UMC_ID, UsuariosMcafeeMovistarMigrarPeer::ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con); $stmt = BasePeer::doCount($criteria, $con);
...@@ -673,10 +673,10 @@ abstract class BaseMcafeeUltimoProcesoMigracionPeer ...@@ -673,10 +673,10 @@ abstract class BaseMcafeeUltimoProcesoMigracionPeer
McafeeUltimoProcesoMigracionPeer::addSelectColumns($criteria); McafeeUltimoProcesoMigracionPeer::addSelectColumns($criteria);
$startcol2 = McafeeUltimoProcesoMigracionPeer::NUM_HYDRATE_COLUMNS; $startcol2 = McafeeUltimoProcesoMigracionPeer::NUM_HYDRATE_COLUMNS;
UsuarioMcafeePeer::addSelectColumns($criteria); UsuariosMcafeeMovistarMigrarPeer::addSelectColumns($criteria);
$startcol3 = $startcol2 + UsuarioMcafeePeer::NUM_HYDRATE_COLUMNS; $startcol3 = $startcol2 + UsuariosMcafeeMovistarMigrarPeer::NUM_HYDRATE_COLUMNS;
$criteria->addJoin(McafeeUltimoProcesoMigracionPeer::ULTIMO_UMC_ID, UsuarioMcafeePeer::UMC_ID, $join_behavior); $criteria->addJoin(McafeeUltimoProcesoMigracionPeer::ULTIMO_UMC_ID, UsuariosMcafeeMovistarMigrarPeer::ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con); $stmt = BasePeer::doSelect($criteria, $con);
$results = array(); $results = array();
...@@ -695,21 +695,21 @@ abstract class BaseMcafeeUltimoProcesoMigracionPeer ...@@ -695,21 +695,21 @@ abstract class BaseMcafeeUltimoProcesoMigracionPeer
McafeeUltimoProcesoMigracionPeer::addInstanceToPool($obj1, $key1); McafeeUltimoProcesoMigracionPeer::addInstanceToPool($obj1, $key1);
} // if obj1 already loaded } // if obj1 already loaded
// Add objects for joined UsuarioMcafee rows // Add objects for joined UsuariosMcafeeMovistarMigrar rows
$key2 = UsuarioMcafeePeer::getPrimaryKeyHashFromRow($row, $startcol2); $key2 = UsuariosMcafeeMovistarMigrarPeer::getPrimaryKeyHashFromRow($row, $startcol2);
if ($key2 !== null) { if ($key2 !== null) {
$obj2 = UsuarioMcafeePeer::getInstanceFromPool($key2); $obj2 = UsuariosMcafeeMovistarMigrarPeer::getInstanceFromPool($key2);
if (!$obj2) { if (!$obj2) {
$cls = UsuarioMcafeePeer::getOMClass(); $cls = UsuariosMcafeeMovistarMigrarPeer::getOMClass();
$obj2 = new $cls(); $obj2 = new $cls();
$obj2->hydrate($row, $startcol2); $obj2->hydrate($row, $startcol2);
UsuarioMcafeePeer::addInstanceToPool($obj2, $key2); UsuariosMcafeeMovistarMigrarPeer::addInstanceToPool($obj2, $key2);
} // if obj2 loaded } // if obj2 loaded
// Add the $obj1 (McafeeUltimoProcesoMigracion) to the collection in $obj2 (UsuarioMcafee) // Add the $obj1 (McafeeUltimoProcesoMigracion) to the collection in $obj2 (UsuariosMcafeeMovistarMigrar)
$obj2->addMcafeeUltimoProcesoMigracion($obj1); $obj2->addMcafeeUltimoProcesoMigracion($obj1);
} // if joined row not null } // if joined row not null
......
...@@ -15,7 +15,7 @@ use \PropelPDO; ...@@ -15,7 +15,7 @@ use \PropelPDO;
use AppBundle\Model\McafeeUltimoProcesoMigracion; use AppBundle\Model\McafeeUltimoProcesoMigracion;
use AppBundle\Model\McafeeUltimoProcesoMigracionPeer; use AppBundle\Model\McafeeUltimoProcesoMigracionPeer;
use AppBundle\Model\McafeeUltimoProcesoMigracionQuery; use AppBundle\Model\McafeeUltimoProcesoMigracionQuery;
use AppBundle\Model\UsuarioMcafee; use AppBundle\Model\UsuariosMcafeeMovistarMigrar;
/** /**
* @method McafeeUltimoProcesoMigracionQuery orderByMupId($order = Criteria::ASC) Order by the mup_id column * @method McafeeUltimoProcesoMigracionQuery orderByMupId($order = Criteria::ASC) Order by the mup_id column
...@@ -36,9 +36,9 @@ use AppBundle\Model\UsuarioMcafee; ...@@ -36,9 +36,9 @@ use AppBundle\Model\UsuarioMcafee;
* @method McafeeUltimoProcesoMigracionQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query * @method McafeeUltimoProcesoMigracionQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method McafeeUltimoProcesoMigracionQuery innerJoin($relation) Adds a INNER JOIN clause to the query * @method McafeeUltimoProcesoMigracionQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* *
* @method McafeeUltimoProcesoMigracionQuery leftJoinUsuarioMcafee($relationAlias = null) Adds a LEFT JOIN clause to the query using the UsuarioMcafee relation * @method McafeeUltimoProcesoMigracionQuery leftJoinUsuariosMcafeeMovistarMigrar($relationAlias = null) Adds a LEFT JOIN clause to the query using the UsuariosMcafeeMovistarMigrar relation
* @method McafeeUltimoProcesoMigracionQuery rightJoinUsuarioMcafee($relationAlias = null) Adds a RIGHT JOIN clause to the query using the UsuarioMcafee relation * @method McafeeUltimoProcesoMigracionQuery rightJoinUsuariosMcafeeMovistarMigrar($relationAlias = null) Adds a RIGHT JOIN clause to the query using the UsuariosMcafeeMovistarMigrar relation
* @method McafeeUltimoProcesoMigracionQuery innerJoinUsuarioMcafee($relationAlias = null) Adds a INNER JOIN clause to the query using the UsuarioMcafee relation * @method McafeeUltimoProcesoMigracionQuery innerJoinUsuariosMcafeeMovistarMigrar($relationAlias = null) Adds a INNER JOIN clause to the query using the UsuariosMcafeeMovistarMigrar relation
* *
* @method McafeeUltimoProcesoMigracion findOne(PropelPDO $con = null) Return the first McafeeUltimoProcesoMigracion matching the query * @method McafeeUltimoProcesoMigracion findOne(PropelPDO $con = null) Return the first McafeeUltimoProcesoMigracion matching the query
* @method McafeeUltimoProcesoMigracion findOneOrCreate(PropelPDO $con = null) Return the first McafeeUltimoProcesoMigracion matching the query, or a new McafeeUltimoProcesoMigracion object populated from the query conditions when no match is found * @method McafeeUltimoProcesoMigracion findOneOrCreate(PropelPDO $con = null) Return the first McafeeUltimoProcesoMigracion matching the query, or a new McafeeUltimoProcesoMigracion object populated from the query conditions when no match is found
...@@ -302,7 +302,7 @@ abstract class BaseMcafeeUltimoProcesoMigracionQuery extends ModelCriteria ...@@ -302,7 +302,7 @@ abstract class BaseMcafeeUltimoProcesoMigracionQuery extends ModelCriteria
* $query->filterByUltimoUmcId(array('max' => 12)); // WHERE ultimo_umc_id <= 12 * $query->filterByUltimoUmcId(array('max' => 12)); // WHERE ultimo_umc_id <= 12
* </code> * </code>
* *
* @see filterByUsuarioMcafee() * @see filterByUsuariosMcafeeMovistarMigrar()
* *
* @param mixed $ultimoUmcId The value to use as filter. * @param mixed $ultimoUmcId The value to use as filter.
* Use scalar values for equality. * Use scalar values for equality.
...@@ -506,43 +506,43 @@ abstract class BaseMcafeeUltimoProcesoMigracionQuery extends ModelCriteria ...@@ -506,43 +506,43 @@ abstract class BaseMcafeeUltimoProcesoMigracionQuery extends ModelCriteria
} }
/** /**
* Filter the query by a related UsuarioMcafee object * Filter the query by a related UsuariosMcafeeMovistarMigrar object
* *
* @param UsuarioMcafee|PropelObjectCollection $usuarioMcafee The related object(s) to use as filter * @param UsuariosMcafeeMovistarMigrar|PropelObjectCollection $usuariosMcafeeMovistarMigrar The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
* *
* @return McafeeUltimoProcesoMigracionQuery The current query, for fluid interface * @return McafeeUltimoProcesoMigracionQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid. * @throws PropelException - if the provided filter is invalid.
*/ */
public function filterByUsuarioMcafee($usuarioMcafee, $comparison = null) public function filterByUsuariosMcafeeMovistarMigrar($usuariosMcafeeMovistarMigrar, $comparison = null)
{ {
if ($usuarioMcafee instanceof UsuarioMcafee) { if ($usuariosMcafeeMovistarMigrar instanceof UsuariosMcafeeMovistarMigrar) {
return $this return $this
->addUsingAlias(McafeeUltimoProcesoMigracionPeer::ULTIMO_UMC_ID, $usuarioMcafee->getUmcId(), $comparison); ->addUsingAlias(McafeeUltimoProcesoMigracionPeer::ULTIMO_UMC_ID, $usuariosMcafeeMovistarMigrar->getId(), $comparison);
} elseif ($usuarioMcafee instanceof PropelObjectCollection) { } elseif ($usuariosMcafeeMovistarMigrar instanceof PropelObjectCollection) {
if (null === $comparison) { if (null === $comparison) {
$comparison = Criteria::IN; $comparison = Criteria::IN;
} }
return $this return $this
->addUsingAlias(McafeeUltimoProcesoMigracionPeer::ULTIMO_UMC_ID, $usuarioMcafee->toKeyValue('PrimaryKey', 'UmcId'), $comparison); ->addUsingAlias(McafeeUltimoProcesoMigracionPeer::ULTIMO_UMC_ID, $usuariosMcafeeMovistarMigrar->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else { } else {
throw new PropelException('filterByUsuarioMcafee() only accepts arguments of type UsuarioMcafee or PropelCollection'); throw new PropelException('filterByUsuariosMcafeeMovistarMigrar() only accepts arguments of type UsuariosMcafeeMovistarMigrar or PropelCollection');
} }
} }
/** /**
* Adds a JOIN clause to the query using the UsuarioMcafee relation * Adds a JOIN clause to the query using the UsuariosMcafeeMovistarMigrar relation
* *
* @param string $relationAlias optional alias for the relation * @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
* *
* @return McafeeUltimoProcesoMigracionQuery The current query, for fluid interface * @return McafeeUltimoProcesoMigracionQuery The current query, for fluid interface
*/ */
public function joinUsuarioMcafee($relationAlias = null, $joinType = Criteria::INNER_JOIN) public function joinUsuariosMcafeeMovistarMigrar($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{ {
$tableMap = $this->getTableMap(); $tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('UsuarioMcafee'); $relationMap = $tableMap->getRelation('UsuariosMcafeeMovistarMigrar');
// create a ModelJoin object for this join // create a ModelJoin object for this join
$join = new ModelJoin(); $join = new ModelJoin();
...@@ -557,14 +557,14 @@ abstract class BaseMcafeeUltimoProcesoMigracionQuery extends ModelCriteria ...@@ -557,14 +557,14 @@ abstract class BaseMcafeeUltimoProcesoMigracionQuery extends ModelCriteria
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias); $this->addJoinObject($join, $relationAlias);
} else { } else {
$this->addJoinObject($join, 'UsuarioMcafee'); $this->addJoinObject($join, 'UsuariosMcafeeMovistarMigrar');
} }
return $this; return $this;
} }
/** /**
* Use the UsuarioMcafee relation UsuarioMcafee object * Use the UsuariosMcafeeMovistarMigrar relation UsuariosMcafeeMovistarMigrar object
* *
* @see useQuery() * @see useQuery()
* *
...@@ -572,13 +572,13 @@ abstract class BaseMcafeeUltimoProcesoMigracionQuery extends ModelCriteria ...@@ -572,13 +572,13 @@ abstract class BaseMcafeeUltimoProcesoMigracionQuery extends ModelCriteria
* to be used as main alias in the secondary query * to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
* *
* @return \AppBundle\Model\UsuarioMcafeeQuery A secondary query class using the current class as primary query * @return \AppBundle\Model\UsuariosMcafeeMovistarMigrarQuery A secondary query class using the current class as primary query
*/ */
public function useUsuarioMcafeeQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) public function useUsuariosMcafeeMovistarMigrarQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{ {
return $this return $this
->joinUsuarioMcafee($relationAlias, $joinType) ->joinUsuariosMcafeeMovistarMigrar($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'UsuarioMcafee', '\AppBundle\Model\UsuarioMcafeeQuery'); ->useQuery($relationAlias ? $relationAlias : 'UsuariosMcafeeMovistarMigrar', '\AppBundle\Model\UsuariosMcafeeMovistarMigrarQuery');
} }
/** /**
......
...@@ -21,8 +21,6 @@ use AppBundle\Model\McafeeTransaccion; ...@@ -21,8 +21,6 @@ use AppBundle\Model\McafeeTransaccion;
use AppBundle\Model\McafeeTransaccionPendiente; use AppBundle\Model\McafeeTransaccionPendiente;
use AppBundle\Model\McafeeTransaccionPendienteQuery; use AppBundle\Model\McafeeTransaccionPendienteQuery;
use AppBundle\Model\McafeeTransaccionQuery; use AppBundle\Model\McafeeTransaccionQuery;
use AppBundle\Model\McafeeUltimoProcesoMigracion;
use AppBundle\Model\McafeeUltimoProcesoMigracionQuery;
use AppBundle\Model\Tracking; use AppBundle\Model\Tracking;
use AppBundle\Model\TrackingQuery; use AppBundle\Model\TrackingQuery;
use AppBundle\Model\UsuarioMcafee; use AppBundle\Model\UsuarioMcafee;
...@@ -189,12 +187,6 @@ abstract class BaseUsuarioMcafee extends BaseObject implements Persistent ...@@ -189,12 +187,6 @@ abstract class BaseUsuarioMcafee extends BaseObject implements Persistent
protected $collMcafeeTransaccionPendientes; protected $collMcafeeTransaccionPendientes;
protected $collMcafeeTransaccionPendientesPartial; protected $collMcafeeTransaccionPendientesPartial;
/**
* @var PropelObjectCollection|McafeeUltimoProcesoMigracion[] Collection to store aggregation of McafeeUltimoProcesoMigracion objects.
*/
protected $collMcafeeUltimoProcesoMigracions;
protected $collMcafeeUltimoProcesoMigracionsPartial;
/** /**
* @var PropelObjectCollection|Tracking[] Collection to store aggregation of Tracking objects. * @var PropelObjectCollection|Tracking[] Collection to store aggregation of Tracking objects.
*/ */
...@@ -239,12 +231,6 @@ abstract class BaseUsuarioMcafee extends BaseObject implements Persistent ...@@ -239,12 +231,6 @@ abstract class BaseUsuarioMcafee extends BaseObject implements Persistent
*/ */
protected $mcafeeTransaccionPendientesScheduledForDeletion = null; protected $mcafeeTransaccionPendientesScheduledForDeletion = null;
/**
* An array of objects scheduled for deletion.
* @var PropelObjectCollection
*/
protected $mcafeeUltimoProcesoMigracionsScheduledForDeletion = null;
/** /**
* An array of objects scheduled for deletion. * An array of objects scheduled for deletion.
* @var PropelObjectCollection * @var PropelObjectCollection
...@@ -1162,8 +1148,6 @@ abstract class BaseUsuarioMcafee extends BaseObject implements Persistent ...@@ -1162,8 +1148,6 @@ abstract class BaseUsuarioMcafee extends BaseObject implements Persistent
$this->collMcafeeTransaccionPendientes = null; $this->collMcafeeTransaccionPendientes = null;
$this->collMcafeeUltimoProcesoMigracions = null;
$this->collTrackings = null; $this->collTrackings = null;
} // if (deep) } // if (deep)
...@@ -1355,23 +1339,6 @@ abstract class BaseUsuarioMcafee extends BaseObject implements Persistent ...@@ -1355,23 +1339,6 @@ abstract class BaseUsuarioMcafee extends BaseObject implements Persistent
} }
} }
if ($this->mcafeeUltimoProcesoMigracionsScheduledForDeletion !== null) {
if (!$this->mcafeeUltimoProcesoMigracionsScheduledForDeletion->isEmpty()) {
McafeeUltimoProcesoMigracionQuery::create()
->filterByPrimaryKeys($this->mcafeeUltimoProcesoMigracionsScheduledForDeletion->getPrimaryKeys(false))
->delete($con);
$this->mcafeeUltimoProcesoMigracionsScheduledForDeletion = null;
}
}
if ($this->collMcafeeUltimoProcesoMigracions !== null) {
foreach ($this->collMcafeeUltimoProcesoMigracions as $referrerFK) {
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
$affectedRows += $referrerFK->save($con);
}
}
}
if ($this->trackingsScheduledForDeletion !== null) { if ($this->trackingsScheduledForDeletion !== null) {
if (!$this->trackingsScheduledForDeletion->isEmpty()) { if (!$this->trackingsScheduledForDeletion->isEmpty()) {
foreach ($this->trackingsScheduledForDeletion as $tracking) { foreach ($this->trackingsScheduledForDeletion as $tracking) {
...@@ -1670,14 +1637,6 @@ abstract class BaseUsuarioMcafee extends BaseObject implements Persistent ...@@ -1670,14 +1637,6 @@ abstract class BaseUsuarioMcafee extends BaseObject implements Persistent
} }
} }
if ($this->collMcafeeUltimoProcesoMigracions !== null) {
foreach ($this->collMcafeeUltimoProcesoMigracions as $referrerFK) {
if (!$referrerFK->validate($columns)) {
$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
}
}
}
if ($this->collTrackings !== null) { if ($this->collTrackings !== null) {
foreach ($this->collTrackings as $referrerFK) { foreach ($this->collTrackings as $referrerFK) {
if (!$referrerFK->validate($columns)) { if (!$referrerFK->validate($columns)) {
...@@ -1846,9 +1805,6 @@ abstract class BaseUsuarioMcafee extends BaseObject implements Persistent ...@@ -1846,9 +1805,6 @@ abstract class BaseUsuarioMcafee extends BaseObject implements Persistent
if (null !== $this->collMcafeeTransaccionPendientes) { if (null !== $this->collMcafeeTransaccionPendientes) {
$result['McafeeTransaccionPendientes'] = $this->collMcafeeTransaccionPendientes->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); $result['McafeeTransaccionPendientes'] = $this->collMcafeeTransaccionPendientes->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
} }
if (null !== $this->collMcafeeUltimoProcesoMigracions) {
$result['McafeeUltimoProcesoMigracions'] = $this->collMcafeeUltimoProcesoMigracions->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
}
if (null !== $this->collTrackings) { if (null !== $this->collTrackings) {
$result['Trackings'] = $this->collTrackings->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); $result['Trackings'] = $this->collTrackings->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
} }
...@@ -2129,12 +2085,6 @@ abstract class BaseUsuarioMcafee extends BaseObject implements Persistent ...@@ -2129,12 +2085,6 @@ abstract class BaseUsuarioMcafee extends BaseObject implements Persistent
} }
} }
foreach ($this->getMcafeeUltimoProcesoMigracions() as $relObj) {
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
$copyObj->addMcafeeUltimoProcesoMigracion($relObj->copy($deepCopy));
}
}
foreach ($this->getTrackings() as $relObj) { foreach ($this->getTrackings() as $relObj) {
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
$copyObj->addTracking($relObj->copy($deepCopy)); $copyObj->addTracking($relObj->copy($deepCopy));
...@@ -2211,9 +2161,6 @@ abstract class BaseUsuarioMcafee extends BaseObject implements Persistent ...@@ -2211,9 +2161,6 @@ abstract class BaseUsuarioMcafee extends BaseObject implements Persistent
if ('McafeeTransaccionPendiente' == $relationName) { if ('McafeeTransaccionPendiente' == $relationName) {
$this->initMcafeeTransaccionPendientes(); $this->initMcafeeTransaccionPendientes();
} }
if ('McafeeUltimoProcesoMigracion' == $relationName) {
$this->initMcafeeUltimoProcesoMigracions();
}
if ('Tracking' == $relationName) { if ('Tracking' == $relationName) {
$this->initTrackings(); $this->initTrackings();
} }
...@@ -2919,231 +2866,6 @@ abstract class BaseUsuarioMcafee extends BaseObject implements Persistent ...@@ -2919,231 +2866,6 @@ abstract class BaseUsuarioMcafee extends BaseObject implements Persistent
return $this; return $this;
} }
/**
* Clears out the collMcafeeUltimoProcesoMigracions collection
*
* This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method.
*
* @return UsuarioMcafee The current object (for fluent API support)
* @see addMcafeeUltimoProcesoMigracions()
*/
public function clearMcafeeUltimoProcesoMigracions()
{
$this->collMcafeeUltimoProcesoMigracions = null; // important to set this to null since that means it is uninitialized
$this->collMcafeeUltimoProcesoMigracionsPartial = null;
return $this;
}
/**
* reset is the collMcafeeUltimoProcesoMigracions collection loaded partially
*
* @return void
*/
public function resetPartialMcafeeUltimoProcesoMigracions($v = true)
{
$this->collMcafeeUltimoProcesoMigracionsPartial = $v;
}
/**
* Initializes the collMcafeeUltimoProcesoMigracions collection.
*
* By default this just sets the collMcafeeUltimoProcesoMigracions collection to an empty array (like clearcollMcafeeUltimoProcesoMigracions());
* however, you may wish to override this method in your stub class to provide setting appropriate
* to your application -- for example, setting the initial array to the values stored in database.
*
* @param boolean $overrideExisting If set to true, the method call initializes
* the collection even if it is not empty
*
* @return void
*/
public function initMcafeeUltimoProcesoMigracions($overrideExisting = true)
{
if (null !== $this->collMcafeeUltimoProcesoMigracions && !$overrideExisting) {
return;
}
$this->collMcafeeUltimoProcesoMigracions = new PropelObjectCollection();
$this->collMcafeeUltimoProcesoMigracions->setModel('McafeeUltimoProcesoMigracion');
}
/**
* Gets an array of McafeeUltimoProcesoMigracion objects which contain a foreign key that references this object.
*
* If the $criteria is not null, it is used to always fetch the results from the database.
* Otherwise the results are fetched from the database the first time, then cached.
* Next time the same method is called without $criteria, the cached collection is returned.
* If this UsuarioMcafee is new, it will return
* an empty collection or the current collection; the criteria is ignored on a new object.
*
* @param Criteria $criteria optional Criteria object to narrow the query
* @param PropelPDO $con optional connection object
* @return PropelObjectCollection|McafeeUltimoProcesoMigracion[] List of McafeeUltimoProcesoMigracion objects
* @throws PropelException
*/
public function getMcafeeUltimoProcesoMigracions($criteria = null, PropelPDO $con = null)
{
$partial = $this->collMcafeeUltimoProcesoMigracionsPartial && !$this->isNew();
if (null === $this->collMcafeeUltimoProcesoMigracions || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collMcafeeUltimoProcesoMigracions) {
// return empty collection
$this->initMcafeeUltimoProcesoMigracions();
} else {
$collMcafeeUltimoProcesoMigracions = McafeeUltimoProcesoMigracionQuery::create(null, $criteria)
->filterByUsuarioMcafee($this)
->find($con);
if (null !== $criteria) {
if (false !== $this->collMcafeeUltimoProcesoMigracionsPartial && count($collMcafeeUltimoProcesoMigracions)) {
$this->initMcafeeUltimoProcesoMigracions(false);
foreach ($collMcafeeUltimoProcesoMigracions as $obj) {
if (false == $this->collMcafeeUltimoProcesoMigracions->contains($obj)) {
$this->collMcafeeUltimoProcesoMigracions->append($obj);
}
}
$this->collMcafeeUltimoProcesoMigracionsPartial = true;
}
$collMcafeeUltimoProcesoMigracions->getInternalIterator()->rewind();
return $collMcafeeUltimoProcesoMigracions;
}
if ($partial && $this->collMcafeeUltimoProcesoMigracions) {
foreach ($this->collMcafeeUltimoProcesoMigracions as $obj) {
if ($obj->isNew()) {
$collMcafeeUltimoProcesoMigracions[] = $obj;
}
}
}
$this->collMcafeeUltimoProcesoMigracions = $collMcafeeUltimoProcesoMigracions;
$this->collMcafeeUltimoProcesoMigracionsPartial = false;
}
}
return $this->collMcafeeUltimoProcesoMigracions;
}
/**
* Sets a collection of McafeeUltimoProcesoMigracion objects related by a one-to-many relationship
* to the current object.
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
* and new objects from the given Propel collection.
*
* @param PropelCollection $mcafeeUltimoProcesoMigracions A Propel collection.
* @param PropelPDO $con Optional connection object
* @return UsuarioMcafee The current object (for fluent API support)
*/
public function setMcafeeUltimoProcesoMigracions(PropelCollection $mcafeeUltimoProcesoMigracions, PropelPDO $con = null)
{
$mcafeeUltimoProcesoMigracionsToDelete = $this->getMcafeeUltimoProcesoMigracions(new Criteria(), $con)->diff($mcafeeUltimoProcesoMigracions);
$this->mcafeeUltimoProcesoMigracionsScheduledForDeletion = $mcafeeUltimoProcesoMigracionsToDelete;
foreach ($mcafeeUltimoProcesoMigracionsToDelete as $mcafeeUltimoProcesoMigracionRemoved) {
$mcafeeUltimoProcesoMigracionRemoved->setUsuarioMcafee(null);
}
$this->collMcafeeUltimoProcesoMigracions = null;
foreach ($mcafeeUltimoProcesoMigracions as $mcafeeUltimoProcesoMigracion) {
$this->addMcafeeUltimoProcesoMigracion($mcafeeUltimoProcesoMigracion);
}
$this->collMcafeeUltimoProcesoMigracions = $mcafeeUltimoProcesoMigracions;
$this->collMcafeeUltimoProcesoMigracionsPartial = false;
return $this;
}
/**
* Returns the number of related McafeeUltimoProcesoMigracion objects.
*
* @param Criteria $criteria
* @param boolean $distinct
* @param PropelPDO $con
* @return int Count of related McafeeUltimoProcesoMigracion objects.
* @throws PropelException
*/
public function countMcafeeUltimoProcesoMigracions(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
{
$partial = $this->collMcafeeUltimoProcesoMigracionsPartial && !$this->isNew();
if (null === $this->collMcafeeUltimoProcesoMigracions || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collMcafeeUltimoProcesoMigracions) {
return 0;
}
if ($partial && !$criteria) {
return count($this->getMcafeeUltimoProcesoMigracions());
}
$query = McafeeUltimoProcesoMigracionQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByUsuarioMcafee($this)
->count($con);
}
return count($this->collMcafeeUltimoProcesoMigracions);
}
/**
* Method called to associate a McafeeUltimoProcesoMigracion object to this object
* through the McafeeUltimoProcesoMigracion foreign key attribute.
*
* @param McafeeUltimoProcesoMigracion $l McafeeUltimoProcesoMigracion
* @return UsuarioMcafee The current object (for fluent API support)
*/
public function addMcafeeUltimoProcesoMigracion(McafeeUltimoProcesoMigracion $l)
{
if ($this->collMcafeeUltimoProcesoMigracions === null) {
$this->initMcafeeUltimoProcesoMigracions();
$this->collMcafeeUltimoProcesoMigracionsPartial = true;
}
if (!in_array($l, $this->collMcafeeUltimoProcesoMigracions->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
$this->doAddMcafeeUltimoProcesoMigracion($l);
if ($this->mcafeeUltimoProcesoMigracionsScheduledForDeletion and $this->mcafeeUltimoProcesoMigracionsScheduledForDeletion->contains($l)) {
$this->mcafeeUltimoProcesoMigracionsScheduledForDeletion->remove($this->mcafeeUltimoProcesoMigracionsScheduledForDeletion->search($l));
}
}
return $this;
}
/**
* @param McafeeUltimoProcesoMigracion $mcafeeUltimoProcesoMigracion The mcafeeUltimoProcesoMigracion object to add.
*/
protected function doAddMcafeeUltimoProcesoMigracion($mcafeeUltimoProcesoMigracion)
{
$this->collMcafeeUltimoProcesoMigracions[]= $mcafeeUltimoProcesoMigracion;
$mcafeeUltimoProcesoMigracion->setUsuarioMcafee($this);
}
/**
* @param McafeeUltimoProcesoMigracion $mcafeeUltimoProcesoMigracion The mcafeeUltimoProcesoMigracion object to remove.
* @return UsuarioMcafee The current object (for fluent API support)
*/
public function removeMcafeeUltimoProcesoMigracion($mcafeeUltimoProcesoMigracion)
{
if ($this->getMcafeeUltimoProcesoMigracions()->contains($mcafeeUltimoProcesoMigracion)) {
$this->collMcafeeUltimoProcesoMigracions->remove($this->collMcafeeUltimoProcesoMigracions->search($mcafeeUltimoProcesoMigracion));
if (null === $this->mcafeeUltimoProcesoMigracionsScheduledForDeletion) {
$this->mcafeeUltimoProcesoMigracionsScheduledForDeletion = clone $this->collMcafeeUltimoProcesoMigracions;
$this->mcafeeUltimoProcesoMigracionsScheduledForDeletion->clear();
}
$this->mcafeeUltimoProcesoMigracionsScheduledForDeletion[]= clone $mcafeeUltimoProcesoMigracion;
$mcafeeUltimoProcesoMigracion->setUsuarioMcafee(null);
}
return $this;
}
/** /**
* Clears out the collTrackings collection * Clears out the collTrackings collection
* *
...@@ -3457,11 +3179,6 @@ abstract class BaseUsuarioMcafee extends BaseObject implements Persistent ...@@ -3457,11 +3179,6 @@ abstract class BaseUsuarioMcafee extends BaseObject implements Persistent
$o->clearAllReferences($deep); $o->clearAllReferences($deep);
} }
} }
if ($this->collMcafeeUltimoProcesoMigracions) {
foreach ($this->collMcafeeUltimoProcesoMigracions as $o) {
$o->clearAllReferences($deep);
}
}
if ($this->collTrackings) { if ($this->collTrackings) {
foreach ($this->collTrackings as $o) { foreach ($this->collTrackings as $o) {
$o->clearAllReferences($deep); $o->clearAllReferences($deep);
...@@ -3483,10 +3200,6 @@ abstract class BaseUsuarioMcafee extends BaseObject implements Persistent ...@@ -3483,10 +3200,6 @@ abstract class BaseUsuarioMcafee extends BaseObject implements Persistent
$this->collMcafeeTransaccionPendientes->clearIterator(); $this->collMcafeeTransaccionPendientes->clearIterator();
} }
$this->collMcafeeTransaccionPendientes = null; $this->collMcafeeTransaccionPendientes = null;
if ($this->collMcafeeUltimoProcesoMigracions instanceof PropelCollection) {
$this->collMcafeeUltimoProcesoMigracions->clearIterator();
}
$this->collMcafeeUltimoProcesoMigracions = null;
if ($this->collTrackings instanceof PropelCollection) { if ($this->collTrackings instanceof PropelCollection) {
$this->collTrackings->clearIterator(); $this->collTrackings->clearIterator();
} }
......
...@@ -15,7 +15,6 @@ use \PropelPDO; ...@@ -15,7 +15,6 @@ use \PropelPDO;
use AppBundle\Model\EnvioEmail; use AppBundle\Model\EnvioEmail;
use AppBundle\Model\McafeeTransaccion; use AppBundle\Model\McafeeTransaccion;
use AppBundle\Model\McafeeTransaccionPendiente; use AppBundle\Model\McafeeTransaccionPendiente;
use AppBundle\Model\McafeeUltimoProcesoMigracion;
use AppBundle\Model\Tracking; use AppBundle\Model\Tracking;
use AppBundle\Model\UsuarioMcafee; use AppBundle\Model\UsuarioMcafee;
use AppBundle\Model\UsuarioMcafeePeer; use AppBundle\Model\UsuarioMcafeePeer;
...@@ -80,10 +79,6 @@ use AppBundle\Model\UsuarioMcafeeQuery; ...@@ -80,10 +79,6 @@ use AppBundle\Model\UsuarioMcafeeQuery;
* @method UsuarioMcafeeQuery rightJoinMcafeeTransaccionPendiente($relationAlias = null) Adds a RIGHT JOIN clause to the query using the McafeeTransaccionPendiente relation * @method UsuarioMcafeeQuery rightJoinMcafeeTransaccionPendiente($relationAlias = null) Adds a RIGHT JOIN clause to the query using the McafeeTransaccionPendiente relation
* @method UsuarioMcafeeQuery innerJoinMcafeeTransaccionPendiente($relationAlias = null) Adds a INNER JOIN clause to the query using the McafeeTransaccionPendiente relation * @method UsuarioMcafeeQuery innerJoinMcafeeTransaccionPendiente($relationAlias = null) Adds a INNER JOIN clause to the query using the McafeeTransaccionPendiente relation
* *
* @method UsuarioMcafeeQuery leftJoinMcafeeUltimoProcesoMigracion($relationAlias = null) Adds a LEFT JOIN clause to the query using the McafeeUltimoProcesoMigracion relation
* @method UsuarioMcafeeQuery rightJoinMcafeeUltimoProcesoMigracion($relationAlias = null) Adds a RIGHT JOIN clause to the query using the McafeeUltimoProcesoMigracion relation
* @method UsuarioMcafeeQuery innerJoinMcafeeUltimoProcesoMigracion($relationAlias = null) Adds a INNER JOIN clause to the query using the McafeeUltimoProcesoMigracion relation
*
* @method UsuarioMcafeeQuery leftJoinTracking($relationAlias = null) Adds a LEFT JOIN clause to the query using the Tracking relation * @method UsuarioMcafeeQuery leftJoinTracking($relationAlias = null) Adds a LEFT JOIN clause to the query using the Tracking relation
* @method UsuarioMcafeeQuery rightJoinTracking($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Tracking relation * @method UsuarioMcafeeQuery rightJoinTracking($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Tracking relation
* @method UsuarioMcafeeQuery innerJoinTracking($relationAlias = null) Adds a INNER JOIN clause to the query using the Tracking relation * @method UsuarioMcafeeQuery innerJoinTracking($relationAlias = null) Adds a INNER JOIN clause to the query using the Tracking relation
...@@ -1202,80 +1197,6 @@ abstract class BaseUsuarioMcafeeQuery extends ModelCriteria ...@@ -1202,80 +1197,6 @@ abstract class BaseUsuarioMcafeeQuery extends ModelCriteria
->useQuery($relationAlias ? $relationAlias : 'McafeeTransaccionPendiente', '\AppBundle\Model\McafeeTransaccionPendienteQuery'); ->useQuery($relationAlias ? $relationAlias : 'McafeeTransaccionPendiente', '\AppBundle\Model\McafeeTransaccionPendienteQuery');
} }
/**
* Filter the query by a related McafeeUltimoProcesoMigracion object
*
* @param McafeeUltimoProcesoMigracion|PropelObjectCollection $mcafeeUltimoProcesoMigracion the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return UsuarioMcafeeQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByMcafeeUltimoProcesoMigracion($mcafeeUltimoProcesoMigracion, $comparison = null)
{
if ($mcafeeUltimoProcesoMigracion instanceof McafeeUltimoProcesoMigracion) {
return $this
->addUsingAlias(UsuarioMcafeePeer::UMC_ID, $mcafeeUltimoProcesoMigracion->getUltimoUmcId(), $comparison);
} elseif ($mcafeeUltimoProcesoMigracion instanceof PropelObjectCollection) {
return $this
->useMcafeeUltimoProcesoMigracionQuery()
->filterByPrimaryKeys($mcafeeUltimoProcesoMigracion->getPrimaryKeys())
->endUse();
} else {
throw new PropelException('filterByMcafeeUltimoProcesoMigracion() only accepts arguments of type McafeeUltimoProcesoMigracion or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the McafeeUltimoProcesoMigracion relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return UsuarioMcafeeQuery The current query, for fluid interface
*/
public function joinMcafeeUltimoProcesoMigracion($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('McafeeUltimoProcesoMigracion');
// create a ModelJoin object for this join
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previousJoin = $this->getPreviousJoin()) {
$join->setPreviousJoin($previousJoin);
}
// add the ModelJoin to the current object
if ($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'McafeeUltimoProcesoMigracion');
}
return $this;
}
/**
* Use the McafeeUltimoProcesoMigracion relation McafeeUltimoProcesoMigracion object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \AppBundle\Model\McafeeUltimoProcesoMigracionQuery A secondary query class using the current class as primary query
*/
public function useMcafeeUltimoProcesoMigracionQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinMcafeeUltimoProcesoMigracion($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'McafeeUltimoProcesoMigracion', '\AppBundle\Model\McafeeUltimoProcesoMigracionQuery');
}
/** /**
* Filter the query by a related Tracking object * Filter the query by a related Tracking object
* *
......
...@@ -10,9 +10,13 @@ use \Exception; ...@@ -10,9 +10,13 @@ use \Exception;
use \PDO; use \PDO;
use \Persistent; use \Persistent;
use \Propel; use \Propel;
use \PropelCollection;
use \PropelDateTime; use \PropelDateTime;
use \PropelException; use \PropelException;
use \PropelObjectCollection;
use \PropelPDO; use \PropelPDO;
use AppBundle\Model\McafeeUltimoProcesoMigracion;
use AppBundle\Model\McafeeUltimoProcesoMigracionQuery;
use AppBundle\Model\UsuariosMcafeeMovistarMigrar; use AppBundle\Model\UsuariosMcafeeMovistarMigrar;
use AppBundle\Model\UsuariosMcafeeMovistarMigrarPeer; use AppBundle\Model\UsuariosMcafeeMovistarMigrarPeer;
use AppBundle\Model\UsuariosMcafeeMovistarMigrarQuery; use AppBundle\Model\UsuariosMcafeeMovistarMigrarQuery;
...@@ -238,6 +242,12 @@ abstract class BaseUsuariosMcafeeMovistarMigrar extends BaseObject implements Pe ...@@ -238,6 +242,12 @@ abstract class BaseUsuariosMcafeeMovistarMigrar extends BaseObject implements Pe
*/ */
protected $sku; protected $sku;
/**
* @var PropelObjectCollection|McafeeUltimoProcesoMigracion[] Collection to store aggregation of McafeeUltimoProcesoMigracion objects.
*/
protected $collMcafeeUltimoProcesoMigracions;
protected $collMcafeeUltimoProcesoMigracionsPartial;
/** /**
* Flag to prevent endless save loop, if this object is referenced * Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction. * by another object which falls in this transaction.
...@@ -258,6 +268,12 @@ abstract class BaseUsuariosMcafeeMovistarMigrar extends BaseObject implements Pe ...@@ -258,6 +268,12 @@ abstract class BaseUsuariosMcafeeMovistarMigrar extends BaseObject implements Pe
*/ */
protected $alreadyInClearAllReferencesDeep = false; protected $alreadyInClearAllReferencesDeep = false;
/**
* An array of objects scheduled for deletion.
* @var PropelObjectCollection
*/
protected $mcafeeUltimoProcesoMigracionsScheduledForDeletion = null;
/** /**
* Applies default values to this object. * Applies default values to this object.
* This method should be called from the object's constructor (or * This method should be called from the object's constructor (or
...@@ -1604,6 +1620,8 @@ abstract class BaseUsuariosMcafeeMovistarMigrar extends BaseObject implements Pe ...@@ -1604,6 +1620,8 @@ abstract class BaseUsuariosMcafeeMovistarMigrar extends BaseObject implements Pe
if ($deep) { // also de-associate any related objects? if ($deep) { // also de-associate any related objects?
$this->collMcafeeUltimoProcesoMigracions = null;
} // if (deep) } // if (deep)
} }
...@@ -1728,6 +1746,23 @@ abstract class BaseUsuariosMcafeeMovistarMigrar extends BaseObject implements Pe ...@@ -1728,6 +1746,23 @@ abstract class BaseUsuariosMcafeeMovistarMigrar extends BaseObject implements Pe
$this->resetModified(); $this->resetModified();
} }
if ($this->mcafeeUltimoProcesoMigracionsScheduledForDeletion !== null) {
if (!$this->mcafeeUltimoProcesoMigracionsScheduledForDeletion->isEmpty()) {
McafeeUltimoProcesoMigracionQuery::create()
->filterByPrimaryKeys($this->mcafeeUltimoProcesoMigracionsScheduledForDeletion->getPrimaryKeys(false))
->delete($con);
$this->mcafeeUltimoProcesoMigracionsScheduledForDeletion = null;
}
}
if ($this->collMcafeeUltimoProcesoMigracions !== null) {
foreach ($this->collMcafeeUltimoProcesoMigracions as $referrerFK) {
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
$affectedRows += $referrerFK->save($con);
}
}
}
$this->alreadyInSave = false; $this->alreadyInSave = false;
} }
...@@ -2062,6 +2097,14 @@ abstract class BaseUsuariosMcafeeMovistarMigrar extends BaseObject implements Pe ...@@ -2062,6 +2097,14 @@ abstract class BaseUsuariosMcafeeMovistarMigrar extends BaseObject implements Pe
} }
if ($this->collMcafeeUltimoProcesoMigracions !== null) {
foreach ($this->collMcafeeUltimoProcesoMigracions as $referrerFK) {
if (!$referrerFK->validate($columns)) {
$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
}
}
}
$this->alreadyInValidation = false; $this->alreadyInValidation = false;
} }
...@@ -2213,10 +2256,11 @@ abstract class BaseUsuariosMcafeeMovistarMigrar extends BaseObject implements Pe ...@@ -2213,10 +2256,11 @@ abstract class BaseUsuariosMcafeeMovistarMigrar extends BaseObject implements Pe
* Defaults to BasePeer::TYPE_PHPNAME. * Defaults to BasePeer::TYPE_PHPNAME.
* @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to true. * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to true.
* @param array $alreadyDumpedObjects List of objects to skip to avoid recursion * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
* @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
* *
* @return array an associative array containing the field names (as keys) and field values * @return array an associative array containing the field names (as keys) and field values
*/ */
public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array()) public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
{ {
if (isset($alreadyDumpedObjects['UsuariosMcafeeMovistarMigrar'][$this->getPrimaryKey()])) { if (isset($alreadyDumpedObjects['UsuariosMcafeeMovistarMigrar'][$this->getPrimaryKey()])) {
return '*RECURSION*'; return '*RECURSION*';
...@@ -2263,6 +2307,11 @@ abstract class BaseUsuariosMcafeeMovistarMigrar extends BaseObject implements Pe ...@@ -2263,6 +2307,11 @@ abstract class BaseUsuariosMcafeeMovistarMigrar extends BaseObject implements Pe
$result[$key] = $virtualColumn; $result[$key] = $virtualColumn;
} }
if ($includeForeignObjects) {
if (null !== $this->collMcafeeUltimoProcesoMigracions) {
$result['McafeeUltimoProcesoMigracions'] = $this->collMcafeeUltimoProcesoMigracions->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
}
}
return $result; return $result;
} }
...@@ -2591,6 +2640,24 @@ abstract class BaseUsuariosMcafeeMovistarMigrar extends BaseObject implements Pe ...@@ -2591,6 +2640,24 @@ abstract class BaseUsuariosMcafeeMovistarMigrar extends BaseObject implements Pe
$copyObj->setDeviceType($this->getDeviceType()); $copyObj->setDeviceType($this->getDeviceType());
$copyObj->setNumeroMcafee($this->getNumeroMcafee()); $copyObj->setNumeroMcafee($this->getNumeroMcafee());
$copyObj->setSku($this->getSku()); $copyObj->setSku($this->getSku());
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->getMcafeeUltimoProcesoMigracions() as $relObj) {
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
$copyObj->addMcafeeUltimoProcesoMigracion($relObj->copy($deepCopy));
}
}
//unflag object copy
$this->startCopy = false;
} // if ($deepCopy)
if ($makeNew) { if ($makeNew) {
$copyObj->setNew(true); $copyObj->setNew(true);
$copyObj->setId(NULL); // this is a auto-increment column, so set to default value $copyObj->setId(NULL); // this is a auto-increment column, so set to default value
...@@ -2637,6 +2704,247 @@ abstract class BaseUsuariosMcafeeMovistarMigrar extends BaseObject implements Pe ...@@ -2637,6 +2704,247 @@ abstract class BaseUsuariosMcafeeMovistarMigrar extends BaseObject implements Pe
return self::$peer; return self::$peer;
} }
/**
* Initializes a collection based on the name of a relation.
* Avoids crafting an 'init[$relationName]s' method name
* that wouldn't work when StandardEnglishPluralizer is used.
*
* @param string $relationName The name of the relation to initialize
* @return void
*/
public function initRelation($relationName)
{
if ('McafeeUltimoProcesoMigracion' == $relationName) {
$this->initMcafeeUltimoProcesoMigracions();
}
}
/**
* Clears out the collMcafeeUltimoProcesoMigracions collection
*
* This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method.
*
* @return UsuariosMcafeeMovistarMigrar The current object (for fluent API support)
* @see addMcafeeUltimoProcesoMigracions()
*/
public function clearMcafeeUltimoProcesoMigracions()
{
$this->collMcafeeUltimoProcesoMigracions = null; // important to set this to null since that means it is uninitialized
$this->collMcafeeUltimoProcesoMigracionsPartial = null;
return $this;
}
/**
* reset is the collMcafeeUltimoProcesoMigracions collection loaded partially
*
* @return void
*/
public function resetPartialMcafeeUltimoProcesoMigracions($v = true)
{
$this->collMcafeeUltimoProcesoMigracionsPartial = $v;
}
/**
* Initializes the collMcafeeUltimoProcesoMigracions collection.
*
* By default this just sets the collMcafeeUltimoProcesoMigracions collection to an empty array (like clearcollMcafeeUltimoProcesoMigracions());
* however, you may wish to override this method in your stub class to provide setting appropriate
* to your application -- for example, setting the initial array to the values stored in database.
*
* @param boolean $overrideExisting If set to true, the method call initializes
* the collection even if it is not empty
*
* @return void
*/
public function initMcafeeUltimoProcesoMigracions($overrideExisting = true)
{
if (null !== $this->collMcafeeUltimoProcesoMigracions && !$overrideExisting) {
return;
}
$this->collMcafeeUltimoProcesoMigracions = new PropelObjectCollection();
$this->collMcafeeUltimoProcesoMigracions->setModel('McafeeUltimoProcesoMigracion');
}
/**
* Gets an array of McafeeUltimoProcesoMigracion objects which contain a foreign key that references this object.
*
* If the $criteria is not null, it is used to always fetch the results from the database.
* Otherwise the results are fetched from the database the first time, then cached.
* Next time the same method is called without $criteria, the cached collection is returned.
* If this UsuariosMcafeeMovistarMigrar is new, it will return
* an empty collection or the current collection; the criteria is ignored on a new object.
*
* @param Criteria $criteria optional Criteria object to narrow the query
* @param PropelPDO $con optional connection object
* @return PropelObjectCollection|McafeeUltimoProcesoMigracion[] List of McafeeUltimoProcesoMigracion objects
* @throws PropelException
*/
public function getMcafeeUltimoProcesoMigracions($criteria = null, PropelPDO $con = null)
{
$partial = $this->collMcafeeUltimoProcesoMigracionsPartial && !$this->isNew();
if (null === $this->collMcafeeUltimoProcesoMigracions || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collMcafeeUltimoProcesoMigracions) {
// return empty collection
$this->initMcafeeUltimoProcesoMigracions();
} else {
$collMcafeeUltimoProcesoMigracions = McafeeUltimoProcesoMigracionQuery::create(null, $criteria)
->filterByUsuariosMcafeeMovistarMigrar($this)
->find($con);
if (null !== $criteria) {
if (false !== $this->collMcafeeUltimoProcesoMigracionsPartial && count($collMcafeeUltimoProcesoMigracions)) {
$this->initMcafeeUltimoProcesoMigracions(false);
foreach ($collMcafeeUltimoProcesoMigracions as $obj) {
if (false == $this->collMcafeeUltimoProcesoMigracions->contains($obj)) {
$this->collMcafeeUltimoProcesoMigracions->append($obj);
}
}
$this->collMcafeeUltimoProcesoMigracionsPartial = true;
}
$collMcafeeUltimoProcesoMigracions->getInternalIterator()->rewind();
return $collMcafeeUltimoProcesoMigracions;
}
if ($partial && $this->collMcafeeUltimoProcesoMigracions) {
foreach ($this->collMcafeeUltimoProcesoMigracions as $obj) {
if ($obj->isNew()) {
$collMcafeeUltimoProcesoMigracions[] = $obj;
}
}
}
$this->collMcafeeUltimoProcesoMigracions = $collMcafeeUltimoProcesoMigracions;
$this->collMcafeeUltimoProcesoMigracionsPartial = false;
}
}
return $this->collMcafeeUltimoProcesoMigracions;
}
/**
* Sets a collection of McafeeUltimoProcesoMigracion objects related by a one-to-many relationship
* to the current object.
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
* and new objects from the given Propel collection.
*
* @param PropelCollection $mcafeeUltimoProcesoMigracions A Propel collection.
* @param PropelPDO $con Optional connection object
* @return UsuariosMcafeeMovistarMigrar The current object (for fluent API support)
*/
public function setMcafeeUltimoProcesoMigracions(PropelCollection $mcafeeUltimoProcesoMigracions, PropelPDO $con = null)
{
$mcafeeUltimoProcesoMigracionsToDelete = $this->getMcafeeUltimoProcesoMigracions(new Criteria(), $con)->diff($mcafeeUltimoProcesoMigracions);
$this->mcafeeUltimoProcesoMigracionsScheduledForDeletion = $mcafeeUltimoProcesoMigracionsToDelete;
foreach ($mcafeeUltimoProcesoMigracionsToDelete as $mcafeeUltimoProcesoMigracionRemoved) {
$mcafeeUltimoProcesoMigracionRemoved->setUsuariosMcafeeMovistarMigrar(null);
}
$this->collMcafeeUltimoProcesoMigracions = null;
foreach ($mcafeeUltimoProcesoMigracions as $mcafeeUltimoProcesoMigracion) {
$this->addMcafeeUltimoProcesoMigracion($mcafeeUltimoProcesoMigracion);
}
$this->collMcafeeUltimoProcesoMigracions = $mcafeeUltimoProcesoMigracions;
$this->collMcafeeUltimoProcesoMigracionsPartial = false;
return $this;
}
/**
* Returns the number of related McafeeUltimoProcesoMigracion objects.
*
* @param Criteria $criteria
* @param boolean $distinct
* @param PropelPDO $con
* @return int Count of related McafeeUltimoProcesoMigracion objects.
* @throws PropelException
*/
public function countMcafeeUltimoProcesoMigracions(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
{
$partial = $this->collMcafeeUltimoProcesoMigracionsPartial && !$this->isNew();
if (null === $this->collMcafeeUltimoProcesoMigracions || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collMcafeeUltimoProcesoMigracions) {
return 0;
}
if ($partial && !$criteria) {
return count($this->getMcafeeUltimoProcesoMigracions());
}
$query = McafeeUltimoProcesoMigracionQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByUsuariosMcafeeMovistarMigrar($this)
->count($con);
}
return count($this->collMcafeeUltimoProcesoMigracions);
}
/**
* Method called to associate a McafeeUltimoProcesoMigracion object to this object
* through the McafeeUltimoProcesoMigracion foreign key attribute.
*
* @param McafeeUltimoProcesoMigracion $l McafeeUltimoProcesoMigracion
* @return UsuariosMcafeeMovistarMigrar The current object (for fluent API support)
*/
public function addMcafeeUltimoProcesoMigracion(McafeeUltimoProcesoMigracion $l)
{
if ($this->collMcafeeUltimoProcesoMigracions === null) {
$this->initMcafeeUltimoProcesoMigracions();
$this->collMcafeeUltimoProcesoMigracionsPartial = true;
}
if (!in_array($l, $this->collMcafeeUltimoProcesoMigracions->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
$this->doAddMcafeeUltimoProcesoMigracion($l);
if ($this->mcafeeUltimoProcesoMigracionsScheduledForDeletion and $this->mcafeeUltimoProcesoMigracionsScheduledForDeletion->contains($l)) {
$this->mcafeeUltimoProcesoMigracionsScheduledForDeletion->remove($this->mcafeeUltimoProcesoMigracionsScheduledForDeletion->search($l));
}
}
return $this;
}
/**
* @param McafeeUltimoProcesoMigracion $mcafeeUltimoProcesoMigracion The mcafeeUltimoProcesoMigracion object to add.
*/
protected function doAddMcafeeUltimoProcesoMigracion($mcafeeUltimoProcesoMigracion)
{
$this->collMcafeeUltimoProcesoMigracions[]= $mcafeeUltimoProcesoMigracion;
$mcafeeUltimoProcesoMigracion->setUsuariosMcafeeMovistarMigrar($this);
}
/**
* @param McafeeUltimoProcesoMigracion $mcafeeUltimoProcesoMigracion The mcafeeUltimoProcesoMigracion object to remove.
* @return UsuariosMcafeeMovistarMigrar The current object (for fluent API support)
*/
public function removeMcafeeUltimoProcesoMigracion($mcafeeUltimoProcesoMigracion)
{
if ($this->getMcafeeUltimoProcesoMigracions()->contains($mcafeeUltimoProcesoMigracion)) {
$this->collMcafeeUltimoProcesoMigracions->remove($this->collMcafeeUltimoProcesoMigracions->search($mcafeeUltimoProcesoMigracion));
if (null === $this->mcafeeUltimoProcesoMigracionsScheduledForDeletion) {
$this->mcafeeUltimoProcesoMigracionsScheduledForDeletion = clone $this->collMcafeeUltimoProcesoMigracions;
$this->mcafeeUltimoProcesoMigracionsScheduledForDeletion->clear();
}
$this->mcafeeUltimoProcesoMigracionsScheduledForDeletion[]= clone $mcafeeUltimoProcesoMigracion;
$mcafeeUltimoProcesoMigracion->setUsuariosMcafeeMovistarMigrar(null);
}
return $this;
}
/** /**
* Clears the current object and sets all attributes to their default values * Clears the current object and sets all attributes to their default values
*/ */
...@@ -2698,10 +3006,19 @@ abstract class BaseUsuariosMcafeeMovistarMigrar extends BaseObject implements Pe ...@@ -2698,10 +3006,19 @@ abstract class BaseUsuariosMcafeeMovistarMigrar extends BaseObject implements Pe
{ {
if ($deep && !$this->alreadyInClearAllReferencesDeep) { if ($deep && !$this->alreadyInClearAllReferencesDeep) {
$this->alreadyInClearAllReferencesDeep = true; $this->alreadyInClearAllReferencesDeep = true;
if ($this->collMcafeeUltimoProcesoMigracions) {
foreach ($this->collMcafeeUltimoProcesoMigracions as $o) {
$o->clearAllReferences($deep);
}
}
$this->alreadyInClearAllReferencesDeep = false; $this->alreadyInClearAllReferencesDeep = false;
} // if ($deep) } // if ($deep)
if ($this->collMcafeeUltimoProcesoMigracions instanceof PropelCollection) {
$this->collMcafeeUltimoProcesoMigracions->clearIterator();
}
$this->collMcafeeUltimoProcesoMigracions = null;
} }
/** /**
......
...@@ -5,11 +5,14 @@ namespace AppBundle\Model\om; ...@@ -5,11 +5,14 @@ namespace AppBundle\Model\om;
use \Criteria; use \Criteria;
use \Exception; use \Exception;
use \ModelCriteria; use \ModelCriteria;
use \ModelJoin;
use \PDO; use \PDO;
use \Propel; use \Propel;
use \PropelCollection;
use \PropelException; use \PropelException;
use \PropelObjectCollection; use \PropelObjectCollection;
use \PropelPDO; use \PropelPDO;
use AppBundle\Model\McafeeUltimoProcesoMigracion;
use AppBundle\Model\UsuariosMcafeeMovistarMigrar; use AppBundle\Model\UsuariosMcafeeMovistarMigrar;
use AppBundle\Model\UsuariosMcafeeMovistarMigrarPeer; use AppBundle\Model\UsuariosMcafeeMovistarMigrarPeer;
use AppBundle\Model\UsuariosMcafeeMovistarMigrarQuery; use AppBundle\Model\UsuariosMcafeeMovistarMigrarQuery;
...@@ -87,6 +90,10 @@ use AppBundle\Model\UsuariosMcafeeMovistarMigrarQuery; ...@@ -87,6 +90,10 @@ use AppBundle\Model\UsuariosMcafeeMovistarMigrarQuery;
* @method UsuariosMcafeeMovistarMigrarQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query * @method UsuariosMcafeeMovistarMigrarQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method UsuariosMcafeeMovistarMigrarQuery innerJoin($relation) Adds a INNER JOIN clause to the query * @method UsuariosMcafeeMovistarMigrarQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* *
* @method UsuariosMcafeeMovistarMigrarQuery leftJoinMcafeeUltimoProcesoMigracion($relationAlias = null) Adds a LEFT JOIN clause to the query using the McafeeUltimoProcesoMigracion relation
* @method UsuariosMcafeeMovistarMigrarQuery rightJoinMcafeeUltimoProcesoMigracion($relationAlias = null) Adds a RIGHT JOIN clause to the query using the McafeeUltimoProcesoMigracion relation
* @method UsuariosMcafeeMovistarMigrarQuery innerJoinMcafeeUltimoProcesoMigracion($relationAlias = null) Adds a INNER JOIN clause to the query using the McafeeUltimoProcesoMigracion relation
*
* @method UsuariosMcafeeMovistarMigrar findOne(PropelPDO $con = null) Return the first UsuariosMcafeeMovistarMigrar matching the query * @method UsuariosMcafeeMovistarMigrar findOne(PropelPDO $con = null) Return the first UsuariosMcafeeMovistarMigrar matching the query
* @method UsuariosMcafeeMovistarMigrar findOneOrCreate(PropelPDO $con = null) Return the first UsuariosMcafeeMovistarMigrar matching the query, or a new UsuariosMcafeeMovistarMigrar object populated from the query conditions when no match is found * @method UsuariosMcafeeMovistarMigrar findOneOrCreate(PropelPDO $con = null) Return the first UsuariosMcafeeMovistarMigrar matching the query, or a new UsuariosMcafeeMovistarMigrar object populated from the query conditions when no match is found
* *
...@@ -1649,6 +1656,80 @@ abstract class BaseUsuariosMcafeeMovistarMigrarQuery extends ModelCriteria ...@@ -1649,6 +1656,80 @@ abstract class BaseUsuariosMcafeeMovistarMigrarQuery extends ModelCriteria
return $this->addUsingAlias(UsuariosMcafeeMovistarMigrarPeer::SKU, $sku, $comparison); return $this->addUsingAlias(UsuariosMcafeeMovistarMigrarPeer::SKU, $sku, $comparison);
} }
/**
* Filter the query by a related McafeeUltimoProcesoMigracion object
*
* @param McafeeUltimoProcesoMigracion|PropelObjectCollection $mcafeeUltimoProcesoMigracion the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return UsuariosMcafeeMovistarMigrarQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByMcafeeUltimoProcesoMigracion($mcafeeUltimoProcesoMigracion, $comparison = null)
{
if ($mcafeeUltimoProcesoMigracion instanceof McafeeUltimoProcesoMigracion) {
return $this
->addUsingAlias(UsuariosMcafeeMovistarMigrarPeer::ID, $mcafeeUltimoProcesoMigracion->getUltimoUmcId(), $comparison);
} elseif ($mcafeeUltimoProcesoMigracion instanceof PropelObjectCollection) {
return $this
->useMcafeeUltimoProcesoMigracionQuery()
->filterByPrimaryKeys($mcafeeUltimoProcesoMigracion->getPrimaryKeys())
->endUse();
} else {
throw new PropelException('filterByMcafeeUltimoProcesoMigracion() only accepts arguments of type McafeeUltimoProcesoMigracion or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the McafeeUltimoProcesoMigracion relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return UsuariosMcafeeMovistarMigrarQuery The current query, for fluid interface
*/
public function joinMcafeeUltimoProcesoMigracion($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('McafeeUltimoProcesoMigracion');
// create a ModelJoin object for this join
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previousJoin = $this->getPreviousJoin()) {
$join->setPreviousJoin($previousJoin);
}
// add the ModelJoin to the current object
if ($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'McafeeUltimoProcesoMigracion');
}
return $this;
}
/**
* Use the McafeeUltimoProcesoMigracion relation McafeeUltimoProcesoMigracion object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \AppBundle\Model\McafeeUltimoProcesoMigracionQuery A secondary query class using the current class as primary query
*/
public function useMcafeeUltimoProcesoMigracionQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinMcafeeUltimoProcesoMigracion($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'McafeeUltimoProcesoMigracion', '\AppBundle\Model\McafeeUltimoProcesoMigracionQuery');
}
/** /**
* Exclude object from result * Exclude object from result
* *
......
...@@ -142,8 +142,8 @@ ...@@ -142,8 +142,8 @@
<column name="mup_cantidad_procesados" phpName="MupCantidadProcesados" type="INTEGER" required="false"/> <column name="mup_cantidad_procesados" phpName="MupCantidadProcesados" type="INTEGER" required="false"/>
<column name="mup_cantidad_pendientes" phpName="MupCantidadPendientes" type="INTEGER" required="false"/> <column name="mup_cantidad_pendientes" phpName="MupCantidadPendientes" type="INTEGER" required="false"/>
<behavior name="timestampable" /> <behavior name="timestampable" />
<foreign-key foreignTable="usuario_mcafee" name="idx_fk_mcafee_ultimo_usuario" onDelete="RESTRICT" onUpdate="RESTRICT"> <foreign-key foreignTable="usuarios_mcafee_movistar_migrar" name="idx_fk_mcafee_ultimo_usuario" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference local="ultimo_umc_id" foreign="umc_id"/> <reference local="ultimo_umc_id" foreign="id"/>
</foreign-key> </foreign-key>
<index name="idx_fk_mcafee_ultimo_usuario_idx"> <index name="idx_fk_mcafee_ultimo_usuario_idx">
<index-column name="ultimo_umc_id"/> <index-column name="ultimo_umc_id"/>
......
...@@ -48,11 +48,13 @@ class McafeeMigrarUsuariosCommand extends ContainerAwareCommand { ...@@ -48,11 +48,13 @@ class McafeeMigrarUsuariosCommand extends ContainerAwareCommand {
->orderByMtpId("DESC") ->orderByMtpId("DESC")
->findOne(); ->findOne();
if ($ultimoIndiceUsuarioProcesado == null) if ($ultimoIndiceUsuarioProcesado == null)
$ultimoIndiceUsuarioProcesado = 0; $condicion = "usuarios_mcafee_movistar_migrar.id > 0";
$log->debug("ultimo indice procesado $ultimoIndiceUsuarioProcesado"); else $condicion = "usuarios_mcafee_movistar_migrar.id > ".$ultimoIndiceUsuarioProcesado->getUmcId();
$log->debug("condicion a analizar ".$condicion);
$log->debug("obteniendo usuarios candidatos a migrar..."); $log->debug("obteniendo usuarios candidatos a migrar...");
$usuariosAMigrar = UsuariosMcafeeMovistarMigrarQuery::create() $usuariosAMigrar = UsuariosMcafeeMovistarMigrarQuery::create()
->where("usuarios_mcafee_movistar_migrar.id > $ultimoIndiceUsuarioProcesado") ->where($condicion)
->limit($usuariosMax) ->limit($usuariosMax)
->find(); ->find();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment