cambios campania

parent ebd49abb
...@@ -521,7 +521,7 @@ ...@@ -521,7 +521,7 @@
lastIndex = data.contenidoId; lastIndex = data.contenidoId;
var valorFila = data.filaValor; var valorFila = data.filaValor;
json.id = lastIndex; json.id = lastIndex;
var actionColumns = '\n\<a id="edit_'+lastIndex+'" href="" onclick="showModalEditar(event,25)" class="navi-link"><span class="btn btn-icon btn-light btn-hover-primary btn-sm"><i class="fa fa-lg fa-edit"></i></span></a>\n\\n\ var actionColumns = '\n\<a id="edit_'+lastIndex+'" href="" onclick="showModalEditar(event,25)" class="navi-link"><span class="btn btn-icon btn-light btn-hover-primary btn-sm"><i class="fa fa-lg fa-edit"></i></span></a>\n\
<a id="delete_' + lastIndex + '" href="" onclick="eliminarContenido(event,' + lastIndex + ', ' + $("#generador-contenido-selector-fila-editar").val() + ')" class="navi-link">\n\ <a id="delete_' + lastIndex + '" href="" onclick="eliminarContenido(event,' + lastIndex + ', ' + $("#generador-contenido-selector-fila-editar").val() + ')" class="navi-link">\n\
<span class="btn btn-icon btn-light btn-hover-primary btn-sm">\n\ <span class="btn btn-icon btn-light btn-hover-primary btn-sm">\n\
<i class="fa fa-lg fa-trash"></i>\n\ <i class="fa fa-lg fa-trash"></i>\n\
......
...@@ -80,6 +80,7 @@ ...@@ -80,6 +80,7 @@
<column name="cco_id" phpName="CcoId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/> <column name="cco_id" phpName="CcoId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="cam_id" phpName="CamId" type="INTEGER" required="false"/> <column name="cam_id" phpName="CamId" type="INTEGER" required="false"/>
<column name="dis_id" phpName="DisId" type="INTEGER" required="false"/> <column name="dis_id" phpName="DisId" type="INTEGER" required="false"/>
<column name="dco_id" phpName="DcoId" type="INTEGER" required="false"/>
<column name="sec_id" phpName="SecId" type="INTEGER" required="false"/> <column name="sec_id" phpName="SecId" type="INTEGER" required="false"/>
<column name="fil_id" phpName="FilId" type="INTEGER" required="false"/> <column name="fil_id" phpName="FilId" type="INTEGER" required="false"/>
<column name="cco_entorno" phpName="CcoEntorno" type="INTEGER" required="false"/> <column name="cco_entorno" phpName="CcoEntorno" type="INTEGER" required="false"/>
...@@ -94,6 +95,9 @@ ...@@ -94,6 +95,9 @@
<foreign-key foreignTable="campania" name="fk_cam_pk_fk" onDelete="RESTRICT" onUpdate="RESTRICT"> <foreign-key foreignTable="campania" name="fk_cam_pk_fk" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference local="cam_id" foreign="cam_id"/> <reference local="cam_id" foreign="cam_id"/>
</foreign-key> </foreign-key>
<foreign-key foreignTable="disposicion_columnas" name="fk_dis_col_pk_fk" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference local="dco_id" foreign="dco_id"/>
</foreign-key>
<foreign-key foreignTable="disposicion" name="fk_dis_pk_fk" onDelete="RESTRICT" onUpdate="RESTRICT"> <foreign-key foreignTable="disposicion" name="fk_dis_pk_fk" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference local="dis_id" foreign="dis_id"/> <reference local="dis_id" foreign="dis_id"/>
</foreign-key> </foreign-key>
...@@ -115,6 +119,9 @@ ...@@ -115,6 +119,9 @@
<index name="fk_fil_pk_fk_idx"> <index name="fk_fil_pk_fk_idx">
<index-column name="fil_id"/> <index-column name="fil_id"/>
</index> </index>
<index name="fk_dis_col_pk_fk_idx">
<index-column name="dco_id"/>
</index>
<vendor type="mysql"> <vendor type="mysql">
<parameter name="Engine" value="InnoDB"/> <parameter name="Engine" value="InnoDB"/>
</vendor> </vendor>
......
...@@ -44,12 +44,13 @@ class CampaniaContenidoTableMap extends TableMap ...@@ -44,12 +44,13 @@ class CampaniaContenidoTableMap extends TableMap
// columns // columns
$this->addPrimaryKey('cco_id', 'CcoId', 'INTEGER', true, null, null); $this->addPrimaryKey('cco_id', 'CcoId', 'INTEGER', true, null, null);
$this->addForeignKey('cam_id', 'CamId', 'INTEGER', 'campania', 'cam_id', false, null, null); $this->addForeignKey('cam_id', 'CamId', 'INTEGER', 'campania', 'cam_id', false, null, null);
$this->addForeignKey('dis_id', 'DisId', 'INTEGER', 'disposicion', 'dis_id', false, 6, null); $this->addForeignKey('dis_id', 'DisId', 'INTEGER', 'disposicion', 'dis_id', false, null, null);
$this->addForeignKey('sec_id', 'SecId', 'INTEGER', 'seccion', 'sec_id', false, 6, null); $this->addForeignKey('dco_id', 'DcoId', 'INTEGER', 'disposicion_columnas', 'dco_id', false, null, null);
$this->addForeignKey('fil_id', 'FilId', 'INTEGER', 'fila', 'fil_id', false, 6, null); $this->addForeignKey('sec_id', 'SecId', 'INTEGER', 'seccion', 'sec_id', false, null, null);
$this->addForeignKey('fil_id', 'FilId', 'INTEGER', 'fila', 'fil_id', false, null, null);
$this->addColumn('cco_entorno', 'CcoEntorno', 'INTEGER', false, null, null); $this->addColumn('cco_entorno', 'CcoEntorno', 'INTEGER', false, null, null);
$this->addColumn('cco_contenido', 'CcoContenido', 'LONGVARCHAR', false, null, null); $this->addColumn('cco_contenido', 'CcoContenido', 'LONGVARCHAR', false, null, null);
$this->addColumn('cco_columna', 'CcoColumna', 'INTEGER', false, 6, null); $this->addColumn('cco_columna', 'CcoColumna', 'INTEGER', false, null, null);
$this->addColumn('cco_orden', 'CcoOrden', 'INTEGER', false, null, null); $this->addColumn('cco_orden', 'CcoOrden', 'INTEGER', false, null, null);
$this->addColumn('cco_tipo', 'CcoTipo', 'INTEGER', false, null, null); $this->addColumn('cco_tipo', 'CcoTipo', 'INTEGER', false, null, null);
$this->addColumn('cco_estado', 'CcoEstado', 'INTEGER', false, null, null); $this->addColumn('cco_estado', 'CcoEstado', 'INTEGER', false, null, null);
...@@ -65,6 +66,7 @@ class CampaniaContenidoTableMap extends TableMap ...@@ -65,6 +66,7 @@ class CampaniaContenidoTableMap extends TableMap
public function buildRelations() public function buildRelations()
{ {
$this->addRelation('Campania', 'AppBundle\\Model\\Campania', RelationMap::MANY_TO_ONE, array('cam_id' => 'cam_id', ), null, null); $this->addRelation('Campania', 'AppBundle\\Model\\Campania', RelationMap::MANY_TO_ONE, array('cam_id' => 'cam_id', ), null, null);
$this->addRelation('DisposicionColumnas', 'AppBundle\\Model\\DisposicionColumnas', RelationMap::MANY_TO_ONE, array('dco_id' => 'dco_id', ), null, null);
$this->addRelation('Disposicion', 'AppBundle\\Model\\Disposicion', RelationMap::MANY_TO_ONE, array('dis_id' => 'dis_id', ), null, null); $this->addRelation('Disposicion', 'AppBundle\\Model\\Disposicion', RelationMap::MANY_TO_ONE, array('dis_id' => 'dis_id', ), null, null);
$this->addRelation('Fila', 'AppBundle\\Model\\Fila', RelationMap::MANY_TO_ONE, array('fil_id' => 'fil_id', ), null, null); $this->addRelation('Fila', 'AppBundle\\Model\\Fila', RelationMap::MANY_TO_ONE, array('fil_id' => 'fil_id', ), null, null);
$this->addRelation('Seccion', 'AppBundle\\Model\\Seccion', RelationMap::MANY_TO_ONE, array('sec_id' => 'sec_id', ), null, null); $this->addRelation('Seccion', 'AppBundle\\Model\\Seccion', RelationMap::MANY_TO_ONE, array('sec_id' => 'sec_id', ), null, null);
......
...@@ -55,6 +55,7 @@ class DisposicionColumnasTableMap extends TableMap ...@@ -55,6 +55,7 @@ class DisposicionColumnasTableMap extends TableMap
*/ */
public function buildRelations() public function buildRelations()
{ {
$this->addRelation('CampaniaContenido', 'AppBundle\\Model\\CampaniaContenido', RelationMap::ONE_TO_MANY, array('dco_id' => 'dco_id', ), null, null, 'CampaniaContenidos');
$this->addRelation('Fila', 'AppBundle\\Model\\Fila', RelationMap::ONE_TO_MANY, array('dco_id' => 'dco_id', ), null, null, 'Filas'); $this->addRelation('Fila', 'AppBundle\\Model\\Fila', RelationMap::ONE_TO_MANY, array('dco_id' => 'dco_id', ), null, null, 'Filas');
} // buildRelations() } // buildRelations()
......
...@@ -2194,6 +2194,31 @@ abstract class BaseCampania extends BaseObject implements Persistent ...@@ -2194,6 +2194,31 @@ abstract class BaseCampania extends BaseObject implements Persistent
} }
/**
* If this collection has already been initialized with
* an identical criteria, it returns the collection.
* Otherwise if this Campania is new, it will return
* an empty collection; or if this Campania has previously
* been saved, it will retrieve related CampaniaContenidos from storage.
*
* This method is protected by default in order to keep the public
* api reasonable. You can provide public methods for those you
* actually need in Campania.
*
* @param Criteria $criteria optional Criteria object to narrow the query
* @param PropelPDO $con optional connection object
* @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return PropelObjectCollection|CampaniaContenido[] List of CampaniaContenido objects
*/
public function getCampaniaContenidosJoinDisposicionColumnas($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$query = CampaniaContenidoQuery::create(null, $criteria);
$query->joinWith('DisposicionColumnas', $join_behavior);
return $this->getCampaniaContenidos($query, $con);
}
/** /**
* If this collection has already been initialized with * If this collection has already been initialized with
* an identical criteria, it returns the collection. * an identical criteria, it returns the collection.
......
...@@ -19,6 +19,8 @@ use AppBundle\Model\CampaniaContenidoPeer; ...@@ -19,6 +19,8 @@ use AppBundle\Model\CampaniaContenidoPeer;
use AppBundle\Model\CampaniaContenidoQuery; use AppBundle\Model\CampaniaContenidoQuery;
use AppBundle\Model\CampaniaQuery; use AppBundle\Model\CampaniaQuery;
use AppBundle\Model\Disposicion; use AppBundle\Model\Disposicion;
use AppBundle\Model\DisposicionColumnas;
use AppBundle\Model\DisposicionColumnasQuery;
use AppBundle\Model\DisposicionQuery; use AppBundle\Model\DisposicionQuery;
use AppBundle\Model\Fila; use AppBundle\Model\Fila;
use AppBundle\Model\FilaQuery; use AppBundle\Model\FilaQuery;
...@@ -64,6 +66,12 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -64,6 +66,12 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
*/ */
protected $dis_id; protected $dis_id;
/**
* The value for the dco_id field.
* @var int
*/
protected $dco_id;
/** /**
* The value for the sec_id field. * The value for the sec_id field.
* @var int * @var int
...@@ -135,6 +143,11 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -135,6 +143,11 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
*/ */
protected $aCampania; protected $aCampania;
/**
* @var DisposicionColumnas
*/
protected $aDisposicionColumnas;
/** /**
* @var Disposicion * @var Disposicion
*/ */
...@@ -203,6 +216,17 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -203,6 +216,17 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
return $this->dis_id; return $this->dis_id;
} }
/**
* Get the [dco_id] column value.
*
* @return int
*/
public function getDcoId()
{
return $this->dco_id;
}
/** /**
* Get the [sec_id] column value. * Get the [sec_id] column value.
* *
...@@ -453,6 +477,31 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -453,6 +477,31 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
return $this; return $this;
} // setDisId() } // setDisId()
/**
* Set the value of [dco_id] column.
*
* @param int $v new value
* @return CampaniaContenido The current object (for fluent API support)
*/
public function setDcoId($v)
{
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
if ($this->dco_id !== $v) {
$this->dco_id = $v;
$this->modifiedColumns[] = CampaniaContenidoPeer::DCO_ID;
}
if ($this->aDisposicionColumnas !== null && $this->aDisposicionColumnas->getDcoId() !== $v) {
$this->aDisposicionColumnas = null;
}
return $this;
} // setDcoId()
/** /**
* Set the value of [sec_id] column. * Set the value of [sec_id] column.
* *
...@@ -731,17 +780,18 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -731,17 +780,18 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
$this->cco_id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; $this->cco_id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
$this->cam_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null; $this->cam_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null;
$this->dis_id = ($row[$startcol + 2] !== null) ? (int) $row[$startcol + 2] : null; $this->dis_id = ($row[$startcol + 2] !== null) ? (int) $row[$startcol + 2] : null;
$this->sec_id = ($row[$startcol + 3] !== null) ? (int) $row[$startcol + 3] : null; $this->dco_id = ($row[$startcol + 3] !== null) ? (int) $row[$startcol + 3] : null;
$this->fil_id = ($row[$startcol + 4] !== null) ? (int) $row[$startcol + 4] : null; $this->sec_id = ($row[$startcol + 4] !== null) ? (int) $row[$startcol + 4] : null;
$this->cco_entorno = ($row[$startcol + 5] !== null) ? (int) $row[$startcol + 5] : null; $this->fil_id = ($row[$startcol + 5] !== null) ? (int) $row[$startcol + 5] : null;
$this->cco_contenido = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null; $this->cco_entorno = ($row[$startcol + 6] !== null) ? (int) $row[$startcol + 6] : null;
$this->cco_columna = ($row[$startcol + 7] !== null) ? (int) $row[$startcol + 7] : null; $this->cco_contenido = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
$this->cco_orden = ($row[$startcol + 8] !== null) ? (int) $row[$startcol + 8] : null; $this->cco_columna = ($row[$startcol + 8] !== null) ? (int) $row[$startcol + 8] : null;
$this->cco_tipo = ($row[$startcol + 9] !== null) ? (int) $row[$startcol + 9] : null; $this->cco_orden = ($row[$startcol + 9] !== null) ? (int) $row[$startcol + 9] : null;
$this->cco_estado = ($row[$startcol + 10] !== null) ? (int) $row[$startcol + 10] : null; $this->cco_tipo = ($row[$startcol + 10] !== null) ? (int) $row[$startcol + 10] : null;
$this->cco_eliminado = ($row[$startcol + 11] !== null) ? (int) $row[$startcol + 11] : null; $this->cco_estado = ($row[$startcol + 11] !== null) ? (int) $row[$startcol + 11] : null;
$this->created_at = ($row[$startcol + 12] !== null) ? (string) $row[$startcol + 12] : null; $this->cco_eliminado = ($row[$startcol + 12] !== null) ? (int) $row[$startcol + 12] : null;
$this->updated_at = ($row[$startcol + 13] !== null) ? (string) $row[$startcol + 13] : null; $this->created_at = ($row[$startcol + 13] !== null) ? (string) $row[$startcol + 13] : null;
$this->updated_at = ($row[$startcol + 14] !== null) ? (string) $row[$startcol + 14] : null;
$this->resetModified(); $this->resetModified();
$this->setNew(false); $this->setNew(false);
...@@ -751,7 +801,7 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -751,7 +801,7 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
} }
$this->postHydrate($row, $startcol, $rehydrate); $this->postHydrate($row, $startcol, $rehydrate);
return $startcol + 14; // 14 = CampaniaContenidoPeer::NUM_HYDRATE_COLUMNS. return $startcol + 15; // 15 = CampaniaContenidoPeer::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) { } catch (Exception $e) {
throw new PropelException("Error populating CampaniaContenido object", $e); throw new PropelException("Error populating CampaniaContenido object", $e);
...@@ -780,6 +830,9 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -780,6 +830,9 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
if ($this->aDisposicion !== null && $this->dis_id !== $this->aDisposicion->getDisId()) { if ($this->aDisposicion !== null && $this->dis_id !== $this->aDisposicion->getDisId()) {
$this->aDisposicion = null; $this->aDisposicion = null;
} }
if ($this->aDisposicionColumnas !== null && $this->dco_id !== $this->aDisposicionColumnas->getDcoId()) {
$this->aDisposicionColumnas = null;
}
if ($this->aSeccion !== null && $this->sec_id !== $this->aSeccion->getSecId()) { if ($this->aSeccion !== null && $this->sec_id !== $this->aSeccion->getSecId()) {
$this->aSeccion = null; $this->aSeccion = null;
} }
...@@ -826,6 +879,7 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -826,6 +879,7 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
if ($deep) { // also de-associate any related objects? if ($deep) { // also de-associate any related objects?
$this->aCampania = null; $this->aCampania = null;
$this->aDisposicionColumnas = null;
$this->aDisposicion = null; $this->aDisposicion = null;
$this->aFila = null; $this->aFila = null;
$this->aSeccion = null; $this->aSeccion = null;
...@@ -965,6 +1019,13 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -965,6 +1019,13 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
$this->setCampania($this->aCampania); $this->setCampania($this->aCampania);
} }
if ($this->aDisposicionColumnas !== null) {
if ($this->aDisposicionColumnas->isModified() || $this->aDisposicionColumnas->isNew()) {
$affectedRows += $this->aDisposicionColumnas->save($con);
}
$this->setDisposicionColumnas($this->aDisposicionColumnas);
}
if ($this->aDisposicion !== null) { if ($this->aDisposicion !== null) {
if ($this->aDisposicion->isModified() || $this->aDisposicion->isNew()) { if ($this->aDisposicion->isModified() || $this->aDisposicion->isNew()) {
$affectedRows += $this->aDisposicion->save($con); $affectedRows += $this->aDisposicion->save($con);
...@@ -1032,6 +1093,9 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -1032,6 +1093,9 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
if ($this->isColumnModified(CampaniaContenidoPeer::DIS_ID)) { if ($this->isColumnModified(CampaniaContenidoPeer::DIS_ID)) {
$modifiedColumns[':p' . $index++] = '`dis_id`'; $modifiedColumns[':p' . $index++] = '`dis_id`';
} }
if ($this->isColumnModified(CampaniaContenidoPeer::DCO_ID)) {
$modifiedColumns[':p' . $index++] = '`dco_id`';
}
if ($this->isColumnModified(CampaniaContenidoPeer::SEC_ID)) { if ($this->isColumnModified(CampaniaContenidoPeer::SEC_ID)) {
$modifiedColumns[':p' . $index++] = '`sec_id`'; $modifiedColumns[':p' . $index++] = '`sec_id`';
} }
...@@ -1085,6 +1149,9 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -1085,6 +1149,9 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
case '`dis_id`': case '`dis_id`':
$stmt->bindValue($identifier, $this->dis_id, PDO::PARAM_INT); $stmt->bindValue($identifier, $this->dis_id, PDO::PARAM_INT);
break; break;
case '`dco_id`':
$stmt->bindValue($identifier, $this->dco_id, PDO::PARAM_INT);
break;
case '`sec_id`': case '`sec_id`':
$stmt->bindValue($identifier, $this->sec_id, PDO::PARAM_INT); $stmt->bindValue($identifier, $this->sec_id, PDO::PARAM_INT);
break; break;
...@@ -1223,6 +1290,12 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -1223,6 +1290,12 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
} }
} }
if ($this->aDisposicionColumnas !== null) {
if (!$this->aDisposicionColumnas->validate($columns)) {
$failureMap = array_merge($failureMap, $this->aDisposicionColumnas->getValidationFailures());
}
}
if ($this->aDisposicion !== null) { if ($this->aDisposicion !== null) {
if (!$this->aDisposicion->validate($columns)) { if (!$this->aDisposicion->validate($columns)) {
$failureMap = array_merge($failureMap, $this->aDisposicion->getValidationFailures()); $failureMap = array_merge($failureMap, $this->aDisposicion->getValidationFailures());
...@@ -1292,36 +1365,39 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -1292,36 +1365,39 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
return $this->getDisId(); return $this->getDisId();
break; break;
case 3: case 3:
return $this->getSecId(); return $this->getDcoId();
break; break;
case 4: case 4:
return $this->getFilId(); return $this->getSecId();
break; break;
case 5: case 5:
return $this->getCcoEntorno(); return $this->getFilId();
break; break;
case 6: case 6:
return $this->getCcoContenido(); return $this->getCcoEntorno();
break; break;
case 7: case 7:
return $this->getCcoColumna(); return $this->getCcoContenido();
break; break;
case 8: case 8:
return $this->getCcoOrden(); return $this->getCcoColumna();
break; break;
case 9: case 9:
return $this->getCcoTipo(); return $this->getCcoOrden();
break; break;
case 10: case 10:
return $this->getCcoEstado(); return $this->getCcoTipo();
break; break;
case 11: case 11:
return $this->getCcoEliminado(); return $this->getCcoEstado();
break; break;
case 12: case 12:
return $this->getCreatedAt(); return $this->getCcoEliminado();
break; break;
case 13: case 13:
return $this->getCreatedAt();
break;
case 14:
return $this->getUpdatedAt(); return $this->getUpdatedAt();
break; break;
default: default:
...@@ -1356,17 +1432,18 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -1356,17 +1432,18 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
$keys[0] => $this->getCcoId(), $keys[0] => $this->getCcoId(),
$keys[1] => $this->getCamId(), $keys[1] => $this->getCamId(),
$keys[2] => $this->getDisId(), $keys[2] => $this->getDisId(),
$keys[3] => $this->getSecId(), $keys[3] => $this->getDcoId(),
$keys[4] => $this->getFilId(), $keys[4] => $this->getSecId(),
$keys[5] => $this->getCcoEntorno(), $keys[5] => $this->getFilId(),
$keys[6] => $this->getCcoContenido(), $keys[6] => $this->getCcoEntorno(),
$keys[7] => $this->getCcoColumna(), $keys[7] => $this->getCcoContenido(),
$keys[8] => $this->getCcoOrden(), $keys[8] => $this->getCcoColumna(),
$keys[9] => $this->getCcoTipo(), $keys[9] => $this->getCcoOrden(),
$keys[10] => $this->getCcoEstado(), $keys[10] => $this->getCcoTipo(),
$keys[11] => $this->getCcoEliminado(), $keys[11] => $this->getCcoEstado(),
$keys[12] => $this->getCreatedAt(), $keys[12] => $this->getCcoEliminado(),
$keys[13] => $this->getUpdatedAt(), $keys[13] => $this->getCreatedAt(),
$keys[14] => $this->getUpdatedAt(),
); );
$virtualColumns = $this->virtualColumns; $virtualColumns = $this->virtualColumns;
foreach ($virtualColumns as $key => $virtualColumn) { foreach ($virtualColumns as $key => $virtualColumn) {
...@@ -1377,6 +1454,9 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -1377,6 +1454,9 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
if (null !== $this->aCampania) { if (null !== $this->aCampania) {
$result['Campania'] = $this->aCampania->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); $result['Campania'] = $this->aCampania->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
} }
if (null !== $this->aDisposicionColumnas) {
$result['DisposicionColumnas'] = $this->aDisposicionColumnas->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
}
if (null !== $this->aDisposicion) { if (null !== $this->aDisposicion) {
$result['Disposicion'] = $this->aDisposicion->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); $result['Disposicion'] = $this->aDisposicion->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
} }
...@@ -1430,36 +1510,39 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -1430,36 +1510,39 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
$this->setDisId($value); $this->setDisId($value);
break; break;
case 3: case 3:
$this->setSecId($value); $this->setDcoId($value);
break; break;
case 4: case 4:
$this->setFilId($value); $this->setSecId($value);
break; break;
case 5: case 5:
$this->setCcoEntorno($value); $this->setFilId($value);
break; break;
case 6: case 6:
$this->setCcoContenido($value); $this->setCcoEntorno($value);
break; break;
case 7: case 7:
$this->setCcoColumna($value); $this->setCcoContenido($value);
break; break;
case 8: case 8:
$this->setCcoOrden($value); $this->setCcoColumna($value);
break; break;
case 9: case 9:
$this->setCcoTipo($value); $this->setCcoOrden($value);
break; break;
case 10: case 10:
$this->setCcoEstado($value); $this->setCcoTipo($value);
break; break;
case 11: case 11:
$this->setCcoEliminado($value); $this->setCcoEstado($value);
break; break;
case 12: case 12:
$this->setCreatedAt($value); $this->setCcoEliminado($value);
break; break;
case 13: case 13:
$this->setCreatedAt($value);
break;
case 14:
$this->setUpdatedAt($value); $this->setUpdatedAt($value);
break; break;
} // switch() } // switch()
...@@ -1489,17 +1572,18 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -1489,17 +1572,18 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
if (array_key_exists($keys[0], $arr)) $this->setCcoId($arr[$keys[0]]); if (array_key_exists($keys[0], $arr)) $this->setCcoId($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setCamId($arr[$keys[1]]); if (array_key_exists($keys[1], $arr)) $this->setCamId($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setDisId($arr[$keys[2]]); if (array_key_exists($keys[2], $arr)) $this->setDisId($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setSecId($arr[$keys[3]]); if (array_key_exists($keys[3], $arr)) $this->setDcoId($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setFilId($arr[$keys[4]]); if (array_key_exists($keys[4], $arr)) $this->setSecId($arr[$keys[4]]);
if (array_key_exists($keys[5], $arr)) $this->setCcoEntorno($arr[$keys[5]]); if (array_key_exists($keys[5], $arr)) $this->setFilId($arr[$keys[5]]);
if (array_key_exists($keys[6], $arr)) $this->setCcoContenido($arr[$keys[6]]); if (array_key_exists($keys[6], $arr)) $this->setCcoEntorno($arr[$keys[6]]);
if (array_key_exists($keys[7], $arr)) $this->setCcoColumna($arr[$keys[7]]); if (array_key_exists($keys[7], $arr)) $this->setCcoContenido($arr[$keys[7]]);
if (array_key_exists($keys[8], $arr)) $this->setCcoOrden($arr[$keys[8]]); if (array_key_exists($keys[8], $arr)) $this->setCcoColumna($arr[$keys[8]]);
if (array_key_exists($keys[9], $arr)) $this->setCcoTipo($arr[$keys[9]]); if (array_key_exists($keys[9], $arr)) $this->setCcoOrden($arr[$keys[9]]);
if (array_key_exists($keys[10], $arr)) $this->setCcoEstado($arr[$keys[10]]); if (array_key_exists($keys[10], $arr)) $this->setCcoTipo($arr[$keys[10]]);
if (array_key_exists($keys[11], $arr)) $this->setCcoEliminado($arr[$keys[11]]); if (array_key_exists($keys[11], $arr)) $this->setCcoEstado($arr[$keys[11]]);
if (array_key_exists($keys[12], $arr)) $this->setCreatedAt($arr[$keys[12]]); if (array_key_exists($keys[12], $arr)) $this->setCcoEliminado($arr[$keys[12]]);
if (array_key_exists($keys[13], $arr)) $this->setUpdatedAt($arr[$keys[13]]); if (array_key_exists($keys[13], $arr)) $this->setCreatedAt($arr[$keys[13]]);
if (array_key_exists($keys[14], $arr)) $this->setUpdatedAt($arr[$keys[14]]);
} }
/** /**
...@@ -1514,6 +1598,7 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -1514,6 +1598,7 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
if ($this->isColumnModified(CampaniaContenidoPeer::CCO_ID)) $criteria->add(CampaniaContenidoPeer::CCO_ID, $this->cco_id); if ($this->isColumnModified(CampaniaContenidoPeer::CCO_ID)) $criteria->add(CampaniaContenidoPeer::CCO_ID, $this->cco_id);
if ($this->isColumnModified(CampaniaContenidoPeer::CAM_ID)) $criteria->add(CampaniaContenidoPeer::CAM_ID, $this->cam_id); if ($this->isColumnModified(CampaniaContenidoPeer::CAM_ID)) $criteria->add(CampaniaContenidoPeer::CAM_ID, $this->cam_id);
if ($this->isColumnModified(CampaniaContenidoPeer::DIS_ID)) $criteria->add(CampaniaContenidoPeer::DIS_ID, $this->dis_id); if ($this->isColumnModified(CampaniaContenidoPeer::DIS_ID)) $criteria->add(CampaniaContenidoPeer::DIS_ID, $this->dis_id);
if ($this->isColumnModified(CampaniaContenidoPeer::DCO_ID)) $criteria->add(CampaniaContenidoPeer::DCO_ID, $this->dco_id);
if ($this->isColumnModified(CampaniaContenidoPeer::SEC_ID)) $criteria->add(CampaniaContenidoPeer::SEC_ID, $this->sec_id); if ($this->isColumnModified(CampaniaContenidoPeer::SEC_ID)) $criteria->add(CampaniaContenidoPeer::SEC_ID, $this->sec_id);
if ($this->isColumnModified(CampaniaContenidoPeer::FIL_ID)) $criteria->add(CampaniaContenidoPeer::FIL_ID, $this->fil_id); if ($this->isColumnModified(CampaniaContenidoPeer::FIL_ID)) $criteria->add(CampaniaContenidoPeer::FIL_ID, $this->fil_id);
if ($this->isColumnModified(CampaniaContenidoPeer::CCO_ENTORNO)) $criteria->add(CampaniaContenidoPeer::CCO_ENTORNO, $this->cco_entorno); if ($this->isColumnModified(CampaniaContenidoPeer::CCO_ENTORNO)) $criteria->add(CampaniaContenidoPeer::CCO_ENTORNO, $this->cco_entorno);
...@@ -1590,6 +1675,7 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -1590,6 +1675,7 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
{ {
$copyObj->setCamId($this->getCamId()); $copyObj->setCamId($this->getCamId());
$copyObj->setDisId($this->getDisId()); $copyObj->setDisId($this->getDisId());
$copyObj->setDcoId($this->getDcoId());
$copyObj->setSecId($this->getSecId()); $copyObj->setSecId($this->getSecId());
$copyObj->setFilId($this->getFilId()); $copyObj->setFilId($this->getFilId());
$copyObj->setCcoEntorno($this->getCcoEntorno()); $copyObj->setCcoEntorno($this->getCcoEntorno());
...@@ -1711,6 +1797,58 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -1711,6 +1797,58 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
return $this->aCampania; return $this->aCampania;
} }
/**
* Declares an association between this object and a DisposicionColumnas object.
*
* @param DisposicionColumnas $v
* @return CampaniaContenido The current object (for fluent API support)
* @throws PropelException
*/
public function setDisposicionColumnas(DisposicionColumnas $v = null)
{
if ($v === null) {
$this->setDcoId(NULL);
} else {
$this->setDcoId($v->getDcoId());
}
$this->aDisposicionColumnas = $v;
// Add binding for other direction of this n:n relationship.
// If this object has already been added to the DisposicionColumnas object, it will not be re-added.
if ($v !== null) {
$v->addCampaniaContenido($this);
}
return $this;
}
/**
* Get the associated DisposicionColumnas object
*
* @param PropelPDO $con Optional Connection object.
* @param $doQuery Executes a query to get the object if required
* @return DisposicionColumnas The associated DisposicionColumnas object.
* @throws PropelException
*/
public function getDisposicionColumnas(PropelPDO $con = null, $doQuery = true)
{
if ($this->aDisposicionColumnas === null && ($this->dco_id !== null) && $doQuery) {
$this->aDisposicionColumnas = DisposicionColumnasQuery::create()->findPk($this->dco_id, $con);
/* The following can be used additionally to
guarantee the related object contains a reference
to this object. This level of coupling may, however, be
undesirable since it could result in an only partially populated collection
in the referenced object.
$this->aDisposicionColumnas->addCampaniaContenidos($this);
*/
}
return $this->aDisposicionColumnas;
}
/** /**
* Declares an association between this object and a Disposicion object. * Declares an association between this object and a Disposicion object.
* *
...@@ -1875,6 +2013,7 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -1875,6 +2013,7 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
$this->cco_id = null; $this->cco_id = null;
$this->cam_id = null; $this->cam_id = null;
$this->dis_id = null; $this->dis_id = null;
$this->dco_id = null;
$this->sec_id = null; $this->sec_id = null;
$this->fil_id = null; $this->fil_id = null;
$this->cco_entorno = null; $this->cco_entorno = null;
...@@ -1911,6 +2050,9 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -1911,6 +2050,9 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
if ($this->aCampania instanceof Persistent) { if ($this->aCampania instanceof Persistent) {
$this->aCampania->clearAllReferences($deep); $this->aCampania->clearAllReferences($deep);
} }
if ($this->aDisposicionColumnas instanceof Persistent) {
$this->aDisposicionColumnas->clearAllReferences($deep);
}
if ($this->aDisposicion instanceof Persistent) { if ($this->aDisposicion instanceof Persistent) {
$this->aDisposicion->clearAllReferences($deep); $this->aDisposicion->clearAllReferences($deep);
} }
...@@ -1925,6 +2067,7 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -1925,6 +2067,7 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
} // if ($deep) } // if ($deep)
$this->aCampania = null; $this->aCampania = null;
$this->aDisposicionColumnas = null;
$this->aDisposicion = null; $this->aDisposicion = null;
$this->aFila = null; $this->aFila = null;
$this->aSeccion = null; $this->aSeccion = null;
......
...@@ -12,6 +12,7 @@ use \PropelPDO; ...@@ -12,6 +12,7 @@ use \PropelPDO;
use AppBundle\Model\CampaniaContenido; use AppBundle\Model\CampaniaContenido;
use AppBundle\Model\CampaniaContenidoPeer; use AppBundle\Model\CampaniaContenidoPeer;
use AppBundle\Model\CampaniaPeer; use AppBundle\Model\CampaniaPeer;
use AppBundle\Model\DisposicionColumnasPeer;
use AppBundle\Model\DisposicionPeer; use AppBundle\Model\DisposicionPeer;
use AppBundle\Model\FilaPeer; use AppBundle\Model\FilaPeer;
use AppBundle\Model\SeccionPeer; use AppBundle\Model\SeccionPeer;
...@@ -33,13 +34,13 @@ abstract class BaseCampaniaContenidoPeer ...@@ -33,13 +34,13 @@ abstract class BaseCampaniaContenidoPeer
const TM_CLASS = 'AppBundle\\Model\\map\\CampaniaContenidoTableMap'; const TM_CLASS = 'AppBundle\\Model\\map\\CampaniaContenidoTableMap';
/** The total number of columns. */ /** The total number of columns. */
const NUM_COLUMNS = 14; const NUM_COLUMNS = 15;
/** The number of lazy-loaded columns. */ /** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0; const NUM_LAZY_LOAD_COLUMNS = 0;
/** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */ /** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */
const NUM_HYDRATE_COLUMNS = 14; const NUM_HYDRATE_COLUMNS = 15;
/** the column name for the cco_id field */ /** the column name for the cco_id field */
const CCO_ID = 'campania_contenido.cco_id'; const CCO_ID = 'campania_contenido.cco_id';
...@@ -50,6 +51,9 @@ abstract class BaseCampaniaContenidoPeer ...@@ -50,6 +51,9 @@ abstract class BaseCampaniaContenidoPeer
/** the column name for the dis_id field */ /** the column name for the dis_id field */
const DIS_ID = 'campania_contenido.dis_id'; const DIS_ID = 'campania_contenido.dis_id';
/** the column name for the dco_id field */
const DCO_ID = 'campania_contenido.dco_id';
/** the column name for the sec_id field */ /** the column name for the sec_id field */
const SEC_ID = 'campania_contenido.sec_id'; const SEC_ID = 'campania_contenido.sec_id';
...@@ -102,12 +106,12 @@ abstract class BaseCampaniaContenidoPeer ...@@ -102,12 +106,12 @@ abstract class BaseCampaniaContenidoPeer
* e.g. CampaniaContenidoPeer::$fieldNames[CampaniaContenidoPeer::TYPE_PHPNAME][0] = 'Id' * e.g. CampaniaContenidoPeer::$fieldNames[CampaniaContenidoPeer::TYPE_PHPNAME][0] = 'Id'
*/ */
protected static $fieldNames = array ( protected static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('CcoId', 'CamId', 'DisId', 'SecId', 'FilId', 'CcoEntorno', 'CcoContenido', 'CcoColumna', 'CcoOrden', 'CcoTipo', 'CcoEstado', 'CcoEliminado', 'CreatedAt', 'UpdatedAt', ), BasePeer::TYPE_PHPNAME => array ('CcoId', 'CamId', 'DisId', 'DcoId', 'SecId', 'FilId', 'CcoEntorno', 'CcoContenido', 'CcoColumna', 'CcoOrden', 'CcoTipo', 'CcoEstado', 'CcoEliminado', 'CreatedAt', 'UpdatedAt', ),
BasePeer::TYPE_STUDLYPHPNAME => array ('ccoId', 'camId', 'disId', 'secId', 'filId', 'ccoEntorno', 'ccoContenido', 'ccoColumna', 'ccoOrden', 'ccoTipo', 'ccoEstado', 'ccoEliminado', 'createdAt', 'updatedAt', ), BasePeer::TYPE_STUDLYPHPNAME => array ('ccoId', 'camId', 'disId', 'dcoId', 'secId', 'filId', 'ccoEntorno', 'ccoContenido', 'ccoColumna', 'ccoOrden', 'ccoTipo', 'ccoEstado', 'ccoEliminado', 'createdAt', 'updatedAt', ),
BasePeer::TYPE_COLNAME => array (CampaniaContenidoPeer::CCO_ID, CampaniaContenidoPeer::CAM_ID, CampaniaContenidoPeer::DIS_ID, CampaniaContenidoPeer::SEC_ID, CampaniaContenidoPeer::FIL_ID, CampaniaContenidoPeer::CCO_ENTORNO, CampaniaContenidoPeer::CCO_CONTENIDO, CampaniaContenidoPeer::CCO_COLUMNA, CampaniaContenidoPeer::CCO_ORDEN, CampaniaContenidoPeer::CCO_TIPO, CampaniaContenidoPeer::CCO_ESTADO, CampaniaContenidoPeer::CCO_ELIMINADO, CampaniaContenidoPeer::CREATED_AT, CampaniaContenidoPeer::UPDATED_AT, ), BasePeer::TYPE_COLNAME => array (CampaniaContenidoPeer::CCO_ID, CampaniaContenidoPeer::CAM_ID, CampaniaContenidoPeer::DIS_ID, CampaniaContenidoPeer::DCO_ID, CampaniaContenidoPeer::SEC_ID, CampaniaContenidoPeer::FIL_ID, CampaniaContenidoPeer::CCO_ENTORNO, CampaniaContenidoPeer::CCO_CONTENIDO, CampaniaContenidoPeer::CCO_COLUMNA, CampaniaContenidoPeer::CCO_ORDEN, CampaniaContenidoPeer::CCO_TIPO, CampaniaContenidoPeer::CCO_ESTADO, CampaniaContenidoPeer::CCO_ELIMINADO, CampaniaContenidoPeer::CREATED_AT, CampaniaContenidoPeer::UPDATED_AT, ),
BasePeer::TYPE_RAW_COLNAME => array ('CCO_ID', 'CAM_ID', 'DIS_ID', 'SEC_ID', 'FIL_ID', 'CCO_ENTORNO', 'CCO_CONTENIDO', 'CCO_COLUMNA', 'CCO_ORDEN', 'CCO_TIPO', 'CCO_ESTADO', 'CCO_ELIMINADO', 'CREATED_AT', 'UPDATED_AT', ), BasePeer::TYPE_RAW_COLNAME => array ('CCO_ID', 'CAM_ID', 'DIS_ID', 'DCO_ID', 'SEC_ID', 'FIL_ID', 'CCO_ENTORNO', 'CCO_CONTENIDO', 'CCO_COLUMNA', 'CCO_ORDEN', 'CCO_TIPO', 'CCO_ESTADO', 'CCO_ELIMINADO', 'CREATED_AT', 'UPDATED_AT', ),
BasePeer::TYPE_FIELDNAME => array ('cco_id', 'cam_id', 'dis_id', 'sec_id', 'fil_id', 'cco_entorno', 'cco_contenido', 'cco_columna', 'cco_orden', 'cco_tipo', 'cco_estado', 'cco_eliminado', 'created_at', 'updated_at', ), BasePeer::TYPE_FIELDNAME => array ('cco_id', 'cam_id', 'dis_id', 'dco_id', 'sec_id', 'fil_id', 'cco_entorno', 'cco_contenido', 'cco_columna', 'cco_orden', 'cco_tipo', 'cco_estado', 'cco_eliminado', 'created_at', 'updated_at', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
); );
/** /**
...@@ -117,12 +121,12 @@ abstract class BaseCampaniaContenidoPeer ...@@ -117,12 +121,12 @@ abstract class BaseCampaniaContenidoPeer
* e.g. CampaniaContenidoPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 * e.g. CampaniaContenidoPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/ */
protected static $fieldKeys = array ( protected static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('CcoId' => 0, 'CamId' => 1, 'DisId' => 2, 'SecId' => 3, 'FilId' => 4, 'CcoEntorno' => 5, 'CcoContenido' => 6, 'CcoColumna' => 7, 'CcoOrden' => 8, 'CcoTipo' => 9, 'CcoEstado' => 10, 'CcoEliminado' => 11, 'CreatedAt' => 12, 'UpdatedAt' => 13, ), BasePeer::TYPE_PHPNAME => array ('CcoId' => 0, 'CamId' => 1, 'DisId' => 2, 'DcoId' => 3, 'SecId' => 4, 'FilId' => 5, 'CcoEntorno' => 6, 'CcoContenido' => 7, 'CcoColumna' => 8, 'CcoOrden' => 9, 'CcoTipo' => 10, 'CcoEstado' => 11, 'CcoEliminado' => 12, 'CreatedAt' => 13, 'UpdatedAt' => 14, ),
BasePeer::TYPE_STUDLYPHPNAME => array ('ccoId' => 0, 'camId' => 1, 'disId' => 2, 'secId' => 3, 'filId' => 4, 'ccoEntorno' => 5, 'ccoContenido' => 6, 'ccoColumna' => 7, 'ccoOrden' => 8, 'ccoTipo' => 9, 'ccoEstado' => 10, 'ccoEliminado' => 11, 'createdAt' => 12, 'updatedAt' => 13, ), BasePeer::TYPE_STUDLYPHPNAME => array ('ccoId' => 0, 'camId' => 1, 'disId' => 2, 'dcoId' => 3, 'secId' => 4, 'filId' => 5, 'ccoEntorno' => 6, 'ccoContenido' => 7, 'ccoColumna' => 8, 'ccoOrden' => 9, 'ccoTipo' => 10, 'ccoEstado' => 11, 'ccoEliminado' => 12, 'createdAt' => 13, 'updatedAt' => 14, ),
BasePeer::TYPE_COLNAME => array (CampaniaContenidoPeer::CCO_ID => 0, CampaniaContenidoPeer::CAM_ID => 1, CampaniaContenidoPeer::DIS_ID => 2, CampaniaContenidoPeer::SEC_ID => 3, CampaniaContenidoPeer::FIL_ID => 4, CampaniaContenidoPeer::CCO_ENTORNO => 5, CampaniaContenidoPeer::CCO_CONTENIDO => 6, CampaniaContenidoPeer::CCO_COLUMNA => 7, CampaniaContenidoPeer::CCO_ORDEN => 8, CampaniaContenidoPeer::CCO_TIPO => 9, CampaniaContenidoPeer::CCO_ESTADO => 10, CampaniaContenidoPeer::CCO_ELIMINADO => 11, CampaniaContenidoPeer::CREATED_AT => 12, CampaniaContenidoPeer::UPDATED_AT => 13, ), BasePeer::TYPE_COLNAME => array (CampaniaContenidoPeer::CCO_ID => 0, CampaniaContenidoPeer::CAM_ID => 1, CampaniaContenidoPeer::DIS_ID => 2, CampaniaContenidoPeer::DCO_ID => 3, CampaniaContenidoPeer::SEC_ID => 4, CampaniaContenidoPeer::FIL_ID => 5, CampaniaContenidoPeer::CCO_ENTORNO => 6, CampaniaContenidoPeer::CCO_CONTENIDO => 7, CampaniaContenidoPeer::CCO_COLUMNA => 8, CampaniaContenidoPeer::CCO_ORDEN => 9, CampaniaContenidoPeer::CCO_TIPO => 10, CampaniaContenidoPeer::CCO_ESTADO => 11, CampaniaContenidoPeer::CCO_ELIMINADO => 12, CampaniaContenidoPeer::CREATED_AT => 13, CampaniaContenidoPeer::UPDATED_AT => 14, ),
BasePeer::TYPE_RAW_COLNAME => array ('CCO_ID' => 0, 'CAM_ID' => 1, 'DIS_ID' => 2, 'SEC_ID' => 3, 'FIL_ID' => 4, 'CCO_ENTORNO' => 5, 'CCO_CONTENIDO' => 6, 'CCO_COLUMNA' => 7, 'CCO_ORDEN' => 8, 'CCO_TIPO' => 9, 'CCO_ESTADO' => 10, 'CCO_ELIMINADO' => 11, 'CREATED_AT' => 12, 'UPDATED_AT' => 13, ), BasePeer::TYPE_RAW_COLNAME => array ('CCO_ID' => 0, 'CAM_ID' => 1, 'DIS_ID' => 2, 'DCO_ID' => 3, 'SEC_ID' => 4, 'FIL_ID' => 5, 'CCO_ENTORNO' => 6, 'CCO_CONTENIDO' => 7, 'CCO_COLUMNA' => 8, 'CCO_ORDEN' => 9, 'CCO_TIPO' => 10, 'CCO_ESTADO' => 11, 'CCO_ELIMINADO' => 12, 'CREATED_AT' => 13, 'UPDATED_AT' => 14, ),
BasePeer::TYPE_FIELDNAME => array ('cco_id' => 0, 'cam_id' => 1, 'dis_id' => 2, 'sec_id' => 3, 'fil_id' => 4, 'cco_entorno' => 5, 'cco_contenido' => 6, 'cco_columna' => 7, 'cco_orden' => 8, 'cco_tipo' => 9, 'cco_estado' => 10, 'cco_eliminado' => 11, 'created_at' => 12, 'updated_at' => 13, ), BasePeer::TYPE_FIELDNAME => array ('cco_id' => 0, 'cam_id' => 1, 'dis_id' => 2, 'dco_id' => 3, 'sec_id' => 4, 'fil_id' => 5, 'cco_entorno' => 6, 'cco_contenido' => 7, 'cco_columna' => 8, 'cco_orden' => 9, 'cco_tipo' => 10, 'cco_estado' => 11, 'cco_eliminado' => 12, 'created_at' => 13, 'updated_at' => 14, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
); );
/** /**
...@@ -199,6 +203,7 @@ abstract class BaseCampaniaContenidoPeer ...@@ -199,6 +203,7 @@ abstract class BaseCampaniaContenidoPeer
$criteria->addSelectColumn(CampaniaContenidoPeer::CCO_ID); $criteria->addSelectColumn(CampaniaContenidoPeer::CCO_ID);
$criteria->addSelectColumn(CampaniaContenidoPeer::CAM_ID); $criteria->addSelectColumn(CampaniaContenidoPeer::CAM_ID);
$criteria->addSelectColumn(CampaniaContenidoPeer::DIS_ID); $criteria->addSelectColumn(CampaniaContenidoPeer::DIS_ID);
$criteria->addSelectColumn(CampaniaContenidoPeer::DCO_ID);
$criteria->addSelectColumn(CampaniaContenidoPeer::SEC_ID); $criteria->addSelectColumn(CampaniaContenidoPeer::SEC_ID);
$criteria->addSelectColumn(CampaniaContenidoPeer::FIL_ID); $criteria->addSelectColumn(CampaniaContenidoPeer::FIL_ID);
$criteria->addSelectColumn(CampaniaContenidoPeer::CCO_ENTORNO); $criteria->addSelectColumn(CampaniaContenidoPeer::CCO_ENTORNO);
...@@ -214,6 +219,7 @@ abstract class BaseCampaniaContenidoPeer ...@@ -214,6 +219,7 @@ abstract class BaseCampaniaContenidoPeer
$criteria->addSelectColumn($alias . '.cco_id'); $criteria->addSelectColumn($alias . '.cco_id');
$criteria->addSelectColumn($alias . '.cam_id'); $criteria->addSelectColumn($alias . '.cam_id');
$criteria->addSelectColumn($alias . '.dis_id'); $criteria->addSelectColumn($alias . '.dis_id');
$criteria->addSelectColumn($alias . '.dco_id');
$criteria->addSelectColumn($alias . '.sec_id'); $criteria->addSelectColumn($alias . '.sec_id');
$criteria->addSelectColumn($alias . '.fil_id'); $criteria->addSelectColumn($alias . '.fil_id');
$criteria->addSelectColumn($alias . '.cco_entorno'); $criteria->addSelectColumn($alias . '.cco_entorno');
...@@ -577,6 +583,57 @@ abstract class BaseCampaniaContenidoPeer ...@@ -577,6 +583,57 @@ abstract class BaseCampaniaContenidoPeer
} }
/**
* Returns the number of rows matching criteria, joining the related DisposicionColumnas table
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
public static function doCountJoinDisposicionColumnas(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// We need to set the primary table name, since in the case that there are no WHERE columns
// it will be impossible for the BasePeer::createSelectSql() method to determine which
// tables go into the FROM clause.
$criteria->setPrimaryTableName(CampaniaContenidoPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
CampaniaContenidoPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
// Set the correct dbName
$criteria->setDbName(CampaniaContenidoPeer::DATABASE_NAME);
if ($con === null) {
$con = Propel::getConnection(CampaniaContenidoPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$criteria->addJoin(CampaniaContenidoPeer::DCO_ID, DisposicionColumnasPeer::DCO_ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$count = (int) $row[0];
} else {
$count = 0; // no rows returned; we infer that means 0 matches.
}
$stmt->closeCursor();
return $count;
}
/** /**
* Returns the number of rows matching criteria, joining the related Disposicion table * Returns the number of rows matching criteria, joining the related Disposicion table
* *
...@@ -797,6 +854,73 @@ abstract class BaseCampaniaContenidoPeer ...@@ -797,6 +854,73 @@ abstract class BaseCampaniaContenidoPeer
} }
/**
* Selects a collection of CampaniaContenido objects pre-filled with their DisposicionColumnas objects.
* @param Criteria $criteria
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return array Array of CampaniaContenido objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectJoinDisposicionColumnas(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
// Set the correct dbName if it has not been overridden
if ($criteria->getDbName() == Propel::getDefaultDB()) {
$criteria->setDbName(CampaniaContenidoPeer::DATABASE_NAME);
}
CampaniaContenidoPeer::addSelectColumns($criteria);
$startcol = CampaniaContenidoPeer::NUM_HYDRATE_COLUMNS;
DisposicionColumnasPeer::addSelectColumns($criteria);
$criteria->addJoin(CampaniaContenidoPeer::DCO_ID, DisposicionColumnasPeer::DCO_ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$key1 = CampaniaContenidoPeer::getPrimaryKeyHashFromRow($row, 0);
if (null !== ($obj1 = CampaniaContenidoPeer::getInstanceFromPool($key1))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj1->hydrate($row, 0, true); // rehydrate
} else {
$cls = CampaniaContenidoPeer::getOMClass();
$obj1 = new $cls();
$obj1->hydrate($row);
CampaniaContenidoPeer::addInstanceToPool($obj1, $key1);
} // if $obj1 already loaded
$key2 = DisposicionColumnasPeer::getPrimaryKeyHashFromRow($row, $startcol);
if ($key2 !== null) {
$obj2 = DisposicionColumnasPeer::getInstanceFromPool($key2);
if (!$obj2) {
$cls = DisposicionColumnasPeer::getOMClass();
$obj2 = new $cls();
$obj2->hydrate($row, $startcol);
DisposicionColumnasPeer::addInstanceToPool($obj2, $key2);
} // if obj2 already loaded
// Add the $obj1 (CampaniaContenido) to $obj2 (DisposicionColumnas)
$obj2->addCampaniaContenido($obj1);
} // if joined row was not null
$results[] = $obj1;
}
$stmt->closeCursor();
return $results;
}
/** /**
* Selects a collection of CampaniaContenido objects pre-filled with their Disposicion objects. * Selects a collection of CampaniaContenido objects pre-filled with their Disposicion objects.
* @param Criteria $criteria * @param Criteria $criteria
...@@ -1036,6 +1160,8 @@ abstract class BaseCampaniaContenidoPeer ...@@ -1036,6 +1160,8 @@ abstract class BaseCampaniaContenidoPeer
$criteria->addJoin(CampaniaContenidoPeer::CAM_ID, CampaniaPeer::CAM_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::CAM_ID, CampaniaPeer::CAM_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::DCO_ID, DisposicionColumnasPeer::DCO_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::DIS_ID, DisposicionPeer::DIS_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::DIS_ID, DisposicionPeer::DIS_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::FIL_ID, FilaPeer::FIL_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::FIL_ID, FilaPeer::FIL_ID, $join_behavior);
...@@ -1079,17 +1205,22 @@ abstract class BaseCampaniaContenidoPeer ...@@ -1079,17 +1205,22 @@ abstract class BaseCampaniaContenidoPeer
CampaniaPeer::addSelectColumns($criteria); CampaniaPeer::addSelectColumns($criteria);
$startcol3 = $startcol2 + CampaniaPeer::NUM_HYDRATE_COLUMNS; $startcol3 = $startcol2 + CampaniaPeer::NUM_HYDRATE_COLUMNS;
DisposicionColumnasPeer::addSelectColumns($criteria);
$startcol4 = $startcol3 + DisposicionColumnasPeer::NUM_HYDRATE_COLUMNS;
DisposicionPeer::addSelectColumns($criteria); DisposicionPeer::addSelectColumns($criteria);
$startcol4 = $startcol3 + DisposicionPeer::NUM_HYDRATE_COLUMNS; $startcol5 = $startcol4 + DisposicionPeer::NUM_HYDRATE_COLUMNS;
FilaPeer::addSelectColumns($criteria); FilaPeer::addSelectColumns($criteria);
$startcol5 = $startcol4 + FilaPeer::NUM_HYDRATE_COLUMNS; $startcol6 = $startcol5 + FilaPeer::NUM_HYDRATE_COLUMNS;
SeccionPeer::addSelectColumns($criteria); SeccionPeer::addSelectColumns($criteria);
$startcol6 = $startcol5 + SeccionPeer::NUM_HYDRATE_COLUMNS; $startcol7 = $startcol6 + SeccionPeer::NUM_HYDRATE_COLUMNS;
$criteria->addJoin(CampaniaContenidoPeer::CAM_ID, CampaniaPeer::CAM_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::CAM_ID, CampaniaPeer::CAM_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::DCO_ID, DisposicionColumnasPeer::DCO_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::DIS_ID, DisposicionPeer::DIS_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::DIS_ID, DisposicionPeer::DIS_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::FIL_ID, FilaPeer::FIL_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::FIL_ID, FilaPeer::FIL_ID, $join_behavior);
...@@ -1131,60 +1262,78 @@ abstract class BaseCampaniaContenidoPeer ...@@ -1131,60 +1262,78 @@ abstract class BaseCampaniaContenidoPeer
$obj2->addCampaniaContenido($obj1); $obj2->addCampaniaContenido($obj1);
} // if joined row not null } // if joined row not null
// Add objects for joined Disposicion rows // Add objects for joined DisposicionColumnas rows
$key3 = DisposicionPeer::getPrimaryKeyHashFromRow($row, $startcol3); $key3 = DisposicionColumnasPeer::getPrimaryKeyHashFromRow($row, $startcol3);
if ($key3 !== null) { if ($key3 !== null) {
$obj3 = DisposicionPeer::getInstanceFromPool($key3); $obj3 = DisposicionColumnasPeer::getInstanceFromPool($key3);
if (!$obj3) { if (!$obj3) {
$cls = DisposicionPeer::getOMClass(); $cls = DisposicionColumnasPeer::getOMClass();
$obj3 = new $cls(); $obj3 = new $cls();
$obj3->hydrate($row, $startcol3); $obj3->hydrate($row, $startcol3);
DisposicionPeer::addInstanceToPool($obj3, $key3); DisposicionColumnasPeer::addInstanceToPool($obj3, $key3);
} // if obj3 loaded } // if obj3 loaded
// Add the $obj1 (CampaniaContenido) to the collection in $obj3 (Disposicion) // Add the $obj1 (CampaniaContenido) to the collection in $obj3 (DisposicionColumnas)
$obj3->addCampaniaContenido($obj1); $obj3->addCampaniaContenido($obj1);
} // if joined row not null } // if joined row not null
// Add objects for joined Fila rows // Add objects for joined Disposicion rows
$key4 = FilaPeer::getPrimaryKeyHashFromRow($row, $startcol4); $key4 = DisposicionPeer::getPrimaryKeyHashFromRow($row, $startcol4);
if ($key4 !== null) { if ($key4 !== null) {
$obj4 = FilaPeer::getInstanceFromPool($key4); $obj4 = DisposicionPeer::getInstanceFromPool($key4);
if (!$obj4) { if (!$obj4) {
$cls = FilaPeer::getOMClass(); $cls = DisposicionPeer::getOMClass();
$obj4 = new $cls(); $obj4 = new $cls();
$obj4->hydrate($row, $startcol4); $obj4->hydrate($row, $startcol4);
FilaPeer::addInstanceToPool($obj4, $key4); DisposicionPeer::addInstanceToPool($obj4, $key4);
} // if obj4 loaded } // if obj4 loaded
// Add the $obj1 (CampaniaContenido) to the collection in $obj4 (Fila) // Add the $obj1 (CampaniaContenido) to the collection in $obj4 (Disposicion)
$obj4->addCampaniaContenido($obj1); $obj4->addCampaniaContenido($obj1);
} // if joined row not null } // if joined row not null
// Add objects for joined Seccion rows // Add objects for joined Fila rows
$key5 = SeccionPeer::getPrimaryKeyHashFromRow($row, $startcol5); $key5 = FilaPeer::getPrimaryKeyHashFromRow($row, $startcol5);
if ($key5 !== null) { if ($key5 !== null) {
$obj5 = SeccionPeer::getInstanceFromPool($key5); $obj5 = FilaPeer::getInstanceFromPool($key5);
if (!$obj5) { if (!$obj5) {
$cls = SeccionPeer::getOMClass(); $cls = FilaPeer::getOMClass();
$obj5 = new $cls(); $obj5 = new $cls();
$obj5->hydrate($row, $startcol5); $obj5->hydrate($row, $startcol5);
SeccionPeer::addInstanceToPool($obj5, $key5); FilaPeer::addInstanceToPool($obj5, $key5);
} // if obj5 loaded } // if obj5 loaded
// Add the $obj1 (CampaniaContenido) to the collection in $obj5 (Seccion) // Add the $obj1 (CampaniaContenido) to the collection in $obj5 (Fila)
$obj5->addCampaniaContenido($obj1); $obj5->addCampaniaContenido($obj1);
} // if joined row not null } // if joined row not null
// Add objects for joined Seccion rows
$key6 = SeccionPeer::getPrimaryKeyHashFromRow($row, $startcol6);
if ($key6 !== null) {
$obj6 = SeccionPeer::getInstanceFromPool($key6);
if (!$obj6) {
$cls = SeccionPeer::getOMClass();
$obj6 = new $cls();
$obj6->hydrate($row, $startcol6);
SeccionPeer::addInstanceToPool($obj6, $key6);
} // if obj6 loaded
// Add the $obj1 (CampaniaContenido) to the collection in $obj6 (Seccion)
$obj6->addCampaniaContenido($obj1);
} // if joined row not null
$results[] = $obj1; $results[] = $obj1;
} }
$stmt->closeCursor(); $stmt->closeCursor();
...@@ -1229,6 +1378,65 @@ abstract class BaseCampaniaContenidoPeer ...@@ -1229,6 +1378,65 @@ abstract class BaseCampaniaContenidoPeer
$con = Propel::getConnection(CampaniaContenidoPeer::DATABASE_NAME, Propel::CONNECTION_READ); $con = Propel::getConnection(CampaniaContenidoPeer::DATABASE_NAME, Propel::CONNECTION_READ);
} }
$criteria->addJoin(CampaniaContenidoPeer::DCO_ID, DisposicionColumnasPeer::DCO_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::DIS_ID, DisposicionPeer::DIS_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::FIL_ID, FilaPeer::FIL_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::SEC_ID, SeccionPeer::SEC_ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$count = (int) $row[0];
} else {
$count = 0; // no rows returned; we infer that means 0 matches.
}
$stmt->closeCursor();
return $count;
}
/**
* Returns the number of rows matching criteria, joining the related DisposicionColumnas table
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
public static function doCountJoinAllExceptDisposicionColumnas(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// We need to set the primary table name, since in the case that there are no WHERE columns
// it will be impossible for the BasePeer::createSelectSql() method to determine which
// tables go into the FROM clause.
$criteria->setPrimaryTableName(CampaniaContenidoPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
CampaniaContenidoPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY should not affect count
// Set the correct dbName
$criteria->setDbName(CampaniaContenidoPeer::DATABASE_NAME);
if ($con === null) {
$con = Propel::getConnection(CampaniaContenidoPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$criteria->addJoin(CampaniaContenidoPeer::CAM_ID, CampaniaPeer::CAM_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::DIS_ID, DisposicionPeer::DIS_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::DIS_ID, DisposicionPeer::DIS_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::FIL_ID, FilaPeer::FIL_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::FIL_ID, FilaPeer::FIL_ID, $join_behavior);
...@@ -1286,6 +1494,8 @@ abstract class BaseCampaniaContenidoPeer ...@@ -1286,6 +1494,8 @@ abstract class BaseCampaniaContenidoPeer
$criteria->addJoin(CampaniaContenidoPeer::CAM_ID, CampaniaPeer::CAM_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::CAM_ID, CampaniaPeer::CAM_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::DCO_ID, DisposicionColumnasPeer::DCO_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::FIL_ID, FilaPeer::FIL_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::FIL_ID, FilaPeer::FIL_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::SEC_ID, SeccionPeer::SEC_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::SEC_ID, SeccionPeer::SEC_ID, $join_behavior);
...@@ -1341,6 +1551,8 @@ abstract class BaseCampaniaContenidoPeer ...@@ -1341,6 +1551,8 @@ abstract class BaseCampaniaContenidoPeer
$criteria->addJoin(CampaniaContenidoPeer::CAM_ID, CampaniaPeer::CAM_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::CAM_ID, CampaniaPeer::CAM_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::DCO_ID, DisposicionColumnasPeer::DCO_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::DIS_ID, DisposicionPeer::DIS_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::DIS_ID, DisposicionPeer::DIS_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::SEC_ID, SeccionPeer::SEC_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::SEC_ID, SeccionPeer::SEC_ID, $join_behavior);
...@@ -1396,6 +1608,8 @@ abstract class BaseCampaniaContenidoPeer ...@@ -1396,6 +1608,8 @@ abstract class BaseCampaniaContenidoPeer
$criteria->addJoin(CampaniaContenidoPeer::CAM_ID, CampaniaPeer::CAM_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::CAM_ID, CampaniaPeer::CAM_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::DCO_ID, DisposicionColumnasPeer::DCO_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::DIS_ID, DisposicionPeer::DIS_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::DIS_ID, DisposicionPeer::DIS_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::FIL_ID, FilaPeer::FIL_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::FIL_ID, FilaPeer::FIL_ID, $join_behavior);
...@@ -1437,14 +1651,19 @@ abstract class BaseCampaniaContenidoPeer ...@@ -1437,14 +1651,19 @@ abstract class BaseCampaniaContenidoPeer
CampaniaContenidoPeer::addSelectColumns($criteria); CampaniaContenidoPeer::addSelectColumns($criteria);
$startcol2 = CampaniaContenidoPeer::NUM_HYDRATE_COLUMNS; $startcol2 = CampaniaContenidoPeer::NUM_HYDRATE_COLUMNS;
DisposicionColumnasPeer::addSelectColumns($criteria);
$startcol3 = $startcol2 + DisposicionColumnasPeer::NUM_HYDRATE_COLUMNS;
DisposicionPeer::addSelectColumns($criteria); DisposicionPeer::addSelectColumns($criteria);
$startcol3 = $startcol2 + DisposicionPeer::NUM_HYDRATE_COLUMNS; $startcol4 = $startcol3 + DisposicionPeer::NUM_HYDRATE_COLUMNS;
FilaPeer::addSelectColumns($criteria); FilaPeer::addSelectColumns($criteria);
$startcol4 = $startcol3 + FilaPeer::NUM_HYDRATE_COLUMNS; $startcol5 = $startcol4 + FilaPeer::NUM_HYDRATE_COLUMNS;
SeccionPeer::addSelectColumns($criteria); SeccionPeer::addSelectColumns($criteria);
$startcol5 = $startcol4 + SeccionPeer::NUM_HYDRATE_COLUMNS; $startcol6 = $startcol5 + SeccionPeer::NUM_HYDRATE_COLUMNS;
$criteria->addJoin(CampaniaContenidoPeer::DCO_ID, DisposicionColumnasPeer::DCO_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::DIS_ID, DisposicionPeer::DIS_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::DIS_ID, DisposicionPeer::DIS_ID, $join_behavior);
...@@ -1470,61 +1689,226 @@ abstract class BaseCampaniaContenidoPeer ...@@ -1470,61 +1689,226 @@ abstract class BaseCampaniaContenidoPeer
CampaniaContenidoPeer::addInstanceToPool($obj1, $key1); CampaniaContenidoPeer::addInstanceToPool($obj1, $key1);
} // if obj1 already loaded } // if obj1 already loaded
// Add objects for joined Disposicion rows // Add objects for joined DisposicionColumnas rows
$key2 = DisposicionPeer::getPrimaryKeyHashFromRow($row, $startcol2); $key2 = DisposicionColumnasPeer::getPrimaryKeyHashFromRow($row, $startcol2);
if ($key2 !== null) { if ($key2 !== null) {
$obj2 = DisposicionPeer::getInstanceFromPool($key2); $obj2 = DisposicionColumnasPeer::getInstanceFromPool($key2);
if (!$obj2) { if (!$obj2) {
$cls = DisposicionPeer::getOMClass(); $cls = DisposicionColumnasPeer::getOMClass();
$obj2 = new $cls(); $obj2 = new $cls();
$obj2->hydrate($row, $startcol2); $obj2->hydrate($row, $startcol2);
DisposicionPeer::addInstanceToPool($obj2, $key2); DisposicionColumnasPeer::addInstanceToPool($obj2, $key2);
} // if $obj2 already loaded } // if $obj2 already loaded
// Add the $obj1 (CampaniaContenido) to the collection in $obj2 (Disposicion) // Add the $obj1 (CampaniaContenido) to the collection in $obj2 (DisposicionColumnas)
$obj2->addCampaniaContenido($obj1); $obj2->addCampaniaContenido($obj1);
} // if joined row is not null } // if joined row is not null
// Add objects for joined Fila rows // Add objects for joined Disposicion rows
$key3 = FilaPeer::getPrimaryKeyHashFromRow($row, $startcol3); $key3 = DisposicionPeer::getPrimaryKeyHashFromRow($row, $startcol3);
if ($key3 !== null) { if ($key3 !== null) {
$obj3 = FilaPeer::getInstanceFromPool($key3); $obj3 = DisposicionPeer::getInstanceFromPool($key3);
if (!$obj3) { if (!$obj3) {
$cls = FilaPeer::getOMClass(); $cls = DisposicionPeer::getOMClass();
$obj3 = new $cls(); $obj3 = new $cls();
$obj3->hydrate($row, $startcol3); $obj3->hydrate($row, $startcol3);
FilaPeer::addInstanceToPool($obj3, $key3); DisposicionPeer::addInstanceToPool($obj3, $key3);
} // if $obj3 already loaded } // if $obj3 already loaded
// Add the $obj1 (CampaniaContenido) to the collection in $obj3 (Fila) // Add the $obj1 (CampaniaContenido) to the collection in $obj3 (Disposicion)
$obj3->addCampaniaContenido($obj1); $obj3->addCampaniaContenido($obj1);
} // if joined row is not null } // if joined row is not null
// Add objects for joined Seccion rows // Add objects for joined Fila rows
$key4 = SeccionPeer::getPrimaryKeyHashFromRow($row, $startcol4); $key4 = FilaPeer::getPrimaryKeyHashFromRow($row, $startcol4);
if ($key4 !== null) { if ($key4 !== null) {
$obj4 = SeccionPeer::getInstanceFromPool($key4); $obj4 = FilaPeer::getInstanceFromPool($key4);
if (!$obj4) { if (!$obj4) {
$cls = FilaPeer::getOMClass();
$obj4 = new $cls();
$obj4->hydrate($row, $startcol4);
FilaPeer::addInstanceToPool($obj4, $key4);
} // if $obj4 already loaded
// Add the $obj1 (CampaniaContenido) to the collection in $obj4 (Fila)
$obj4->addCampaniaContenido($obj1);
} // if joined row is not null
// Add objects for joined Seccion rows
$key5 = SeccionPeer::getPrimaryKeyHashFromRow($row, $startcol5);
if ($key5 !== null) {
$obj5 = SeccionPeer::getInstanceFromPool($key5);
if (!$obj5) {
$cls = SeccionPeer::getOMClass(); $cls = SeccionPeer::getOMClass();
$obj5 = new $cls();
$obj5->hydrate($row, $startcol5);
SeccionPeer::addInstanceToPool($obj5, $key5);
} // if $obj5 already loaded
// Add the $obj1 (CampaniaContenido) to the collection in $obj5 (Seccion)
$obj5->addCampaniaContenido($obj1);
} // if joined row is not null
$results[] = $obj1;
}
$stmt->closeCursor();
return $results;
}
/**
* Selects a collection of CampaniaContenido objects pre-filled with all related objects except DisposicionColumnas.
*
* @param Criteria $criteria
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return array Array of CampaniaContenido objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectJoinAllExceptDisposicionColumnas(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
// Set the correct dbName if it has not been overridden
// $criteria->getDbName() will return the same object if not set to another value
// so == check is okay and faster
if ($criteria->getDbName() == Propel::getDefaultDB()) {
$criteria->setDbName(CampaniaContenidoPeer::DATABASE_NAME);
}
CampaniaContenidoPeer::addSelectColumns($criteria);
$startcol2 = CampaniaContenidoPeer::NUM_HYDRATE_COLUMNS;
CampaniaPeer::addSelectColumns($criteria);
$startcol3 = $startcol2 + CampaniaPeer::NUM_HYDRATE_COLUMNS;
DisposicionPeer::addSelectColumns($criteria);
$startcol4 = $startcol3 + DisposicionPeer::NUM_HYDRATE_COLUMNS;
FilaPeer::addSelectColumns($criteria);
$startcol5 = $startcol4 + FilaPeer::NUM_HYDRATE_COLUMNS;
SeccionPeer::addSelectColumns($criteria);
$startcol6 = $startcol5 + SeccionPeer::NUM_HYDRATE_COLUMNS;
$criteria->addJoin(CampaniaContenidoPeer::CAM_ID, CampaniaPeer::CAM_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::DIS_ID, DisposicionPeer::DIS_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::FIL_ID, FilaPeer::FIL_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::SEC_ID, SeccionPeer::SEC_ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$key1 = CampaniaContenidoPeer::getPrimaryKeyHashFromRow($row, 0);
if (null !== ($obj1 = CampaniaContenidoPeer::getInstanceFromPool($key1))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj1->hydrate($row, 0, true); // rehydrate
} else {
$cls = CampaniaContenidoPeer::getOMClass();
$obj1 = new $cls();
$obj1->hydrate($row);
CampaniaContenidoPeer::addInstanceToPool($obj1, $key1);
} // if obj1 already loaded
// Add objects for joined Campania rows
$key2 = CampaniaPeer::getPrimaryKeyHashFromRow($row, $startcol2);
if ($key2 !== null) {
$obj2 = CampaniaPeer::getInstanceFromPool($key2);
if (!$obj2) {
$cls = CampaniaPeer::getOMClass();
$obj2 = new $cls();
$obj2->hydrate($row, $startcol2);
CampaniaPeer::addInstanceToPool($obj2, $key2);
} // if $obj2 already loaded
// Add the $obj1 (CampaniaContenido) to the collection in $obj2 (Campania)
$obj2->addCampaniaContenido($obj1);
} // if joined row is not null
// Add objects for joined Disposicion rows
$key3 = DisposicionPeer::getPrimaryKeyHashFromRow($row, $startcol3);
if ($key3 !== null) {
$obj3 = DisposicionPeer::getInstanceFromPool($key3);
if (!$obj3) {
$cls = DisposicionPeer::getOMClass();
$obj3 = new $cls();
$obj3->hydrate($row, $startcol3);
DisposicionPeer::addInstanceToPool($obj3, $key3);
} // if $obj3 already loaded
// Add the $obj1 (CampaniaContenido) to the collection in $obj3 (Disposicion)
$obj3->addCampaniaContenido($obj1);
} // if joined row is not null
// Add objects for joined Fila rows
$key4 = FilaPeer::getPrimaryKeyHashFromRow($row, $startcol4);
if ($key4 !== null) {
$obj4 = FilaPeer::getInstanceFromPool($key4);
if (!$obj4) {
$cls = FilaPeer::getOMClass();
$obj4 = new $cls(); $obj4 = new $cls();
$obj4->hydrate($row, $startcol4); $obj4->hydrate($row, $startcol4);
SeccionPeer::addInstanceToPool($obj4, $key4); FilaPeer::addInstanceToPool($obj4, $key4);
} // if $obj4 already loaded } // if $obj4 already loaded
// Add the $obj1 (CampaniaContenido) to the collection in $obj4 (Seccion) // Add the $obj1 (CampaniaContenido) to the collection in $obj4 (Fila)
$obj4->addCampaniaContenido($obj1); $obj4->addCampaniaContenido($obj1);
} // if joined row is not null
// Add objects for joined Seccion rows
$key5 = SeccionPeer::getPrimaryKeyHashFromRow($row, $startcol5);
if ($key5 !== null) {
$obj5 = SeccionPeer::getInstanceFromPool($key5);
if (!$obj5) {
$cls = SeccionPeer::getOMClass();
$obj5 = new $cls();
$obj5->hydrate($row, $startcol5);
SeccionPeer::addInstanceToPool($obj5, $key5);
} // if $obj5 already loaded
// Add the $obj1 (CampaniaContenido) to the collection in $obj5 (Seccion)
$obj5->addCampaniaContenido($obj1);
} // if joined row is not null } // if joined row is not null
$results[] = $obj1; $results[] = $obj1;
...@@ -1562,14 +1946,19 @@ abstract class BaseCampaniaContenidoPeer ...@@ -1562,14 +1946,19 @@ abstract class BaseCampaniaContenidoPeer
CampaniaPeer::addSelectColumns($criteria); CampaniaPeer::addSelectColumns($criteria);
$startcol3 = $startcol2 + CampaniaPeer::NUM_HYDRATE_COLUMNS; $startcol3 = $startcol2 + CampaniaPeer::NUM_HYDRATE_COLUMNS;
DisposicionColumnasPeer::addSelectColumns($criteria);
$startcol4 = $startcol3 + DisposicionColumnasPeer::NUM_HYDRATE_COLUMNS;
FilaPeer::addSelectColumns($criteria); FilaPeer::addSelectColumns($criteria);
$startcol4 = $startcol3 + FilaPeer::NUM_HYDRATE_COLUMNS; $startcol5 = $startcol4 + FilaPeer::NUM_HYDRATE_COLUMNS;
SeccionPeer::addSelectColumns($criteria); SeccionPeer::addSelectColumns($criteria);
$startcol5 = $startcol4 + SeccionPeer::NUM_HYDRATE_COLUMNS; $startcol6 = $startcol5 + SeccionPeer::NUM_HYDRATE_COLUMNS;
$criteria->addJoin(CampaniaContenidoPeer::CAM_ID, CampaniaPeer::CAM_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::CAM_ID, CampaniaPeer::CAM_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::DCO_ID, DisposicionColumnasPeer::DCO_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::FIL_ID, FilaPeer::FIL_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::FIL_ID, FilaPeer::FIL_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::SEC_ID, SeccionPeer::SEC_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::SEC_ID, SeccionPeer::SEC_ID, $join_behavior);
...@@ -1611,42 +2000,61 @@ abstract class BaseCampaniaContenidoPeer ...@@ -1611,42 +2000,61 @@ abstract class BaseCampaniaContenidoPeer
} // if joined row is not null } // if joined row is not null
// Add objects for joined Fila rows // Add objects for joined DisposicionColumnas rows
$key3 = FilaPeer::getPrimaryKeyHashFromRow($row, $startcol3); $key3 = DisposicionColumnasPeer::getPrimaryKeyHashFromRow($row, $startcol3);
if ($key3 !== null) { if ($key3 !== null) {
$obj3 = FilaPeer::getInstanceFromPool($key3); $obj3 = DisposicionColumnasPeer::getInstanceFromPool($key3);
if (!$obj3) { if (!$obj3) {
$cls = FilaPeer::getOMClass(); $cls = DisposicionColumnasPeer::getOMClass();
$obj3 = new $cls(); $obj3 = new $cls();
$obj3->hydrate($row, $startcol3); $obj3->hydrate($row, $startcol3);
FilaPeer::addInstanceToPool($obj3, $key3); DisposicionColumnasPeer::addInstanceToPool($obj3, $key3);
} // if $obj3 already loaded } // if $obj3 already loaded
// Add the $obj1 (CampaniaContenido) to the collection in $obj3 (Fila) // Add the $obj1 (CampaniaContenido) to the collection in $obj3 (DisposicionColumnas)
$obj3->addCampaniaContenido($obj1); $obj3->addCampaniaContenido($obj1);
} // if joined row is not null } // if joined row is not null
// Add objects for joined Seccion rows // Add objects for joined Fila rows
$key4 = SeccionPeer::getPrimaryKeyHashFromRow($row, $startcol4); $key4 = FilaPeer::getPrimaryKeyHashFromRow($row, $startcol4);
if ($key4 !== null) { if ($key4 !== null) {
$obj4 = SeccionPeer::getInstanceFromPool($key4); $obj4 = FilaPeer::getInstanceFromPool($key4);
if (!$obj4) { if (!$obj4) {
$cls = SeccionPeer::getOMClass(); $cls = FilaPeer::getOMClass();
$obj4 = new $cls(); $obj4 = new $cls();
$obj4->hydrate($row, $startcol4); $obj4->hydrate($row, $startcol4);
SeccionPeer::addInstanceToPool($obj4, $key4); FilaPeer::addInstanceToPool($obj4, $key4);
} // if $obj4 already loaded } // if $obj4 already loaded
// Add the $obj1 (CampaniaContenido) to the collection in $obj4 (Seccion) // Add the $obj1 (CampaniaContenido) to the collection in $obj4 (Fila)
$obj4->addCampaniaContenido($obj1); $obj4->addCampaniaContenido($obj1);
} // if joined row is not null
// Add objects for joined Seccion rows
$key5 = SeccionPeer::getPrimaryKeyHashFromRow($row, $startcol5);
if ($key5 !== null) {
$obj5 = SeccionPeer::getInstanceFromPool($key5);
if (!$obj5) {
$cls = SeccionPeer::getOMClass();
$obj5 = new $cls();
$obj5->hydrate($row, $startcol5);
SeccionPeer::addInstanceToPool($obj5, $key5);
} // if $obj5 already loaded
// Add the $obj1 (CampaniaContenido) to the collection in $obj5 (Seccion)
$obj5->addCampaniaContenido($obj1);
} // if joined row is not null } // if joined row is not null
$results[] = $obj1; $results[] = $obj1;
...@@ -1684,14 +2092,19 @@ abstract class BaseCampaniaContenidoPeer ...@@ -1684,14 +2092,19 @@ abstract class BaseCampaniaContenidoPeer
CampaniaPeer::addSelectColumns($criteria); CampaniaPeer::addSelectColumns($criteria);
$startcol3 = $startcol2 + CampaniaPeer::NUM_HYDRATE_COLUMNS; $startcol3 = $startcol2 + CampaniaPeer::NUM_HYDRATE_COLUMNS;
DisposicionColumnasPeer::addSelectColumns($criteria);
$startcol4 = $startcol3 + DisposicionColumnasPeer::NUM_HYDRATE_COLUMNS;
DisposicionPeer::addSelectColumns($criteria); DisposicionPeer::addSelectColumns($criteria);
$startcol4 = $startcol3 + DisposicionPeer::NUM_HYDRATE_COLUMNS; $startcol5 = $startcol4 + DisposicionPeer::NUM_HYDRATE_COLUMNS;
SeccionPeer::addSelectColumns($criteria); SeccionPeer::addSelectColumns($criteria);
$startcol5 = $startcol4 + SeccionPeer::NUM_HYDRATE_COLUMNS; $startcol6 = $startcol5 + SeccionPeer::NUM_HYDRATE_COLUMNS;
$criteria->addJoin(CampaniaContenidoPeer::CAM_ID, CampaniaPeer::CAM_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::CAM_ID, CampaniaPeer::CAM_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::DCO_ID, DisposicionColumnasPeer::DCO_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::DIS_ID, DisposicionPeer::DIS_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::DIS_ID, DisposicionPeer::DIS_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::SEC_ID, SeccionPeer::SEC_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::SEC_ID, SeccionPeer::SEC_ID, $join_behavior);
...@@ -1733,42 +2146,61 @@ abstract class BaseCampaniaContenidoPeer ...@@ -1733,42 +2146,61 @@ abstract class BaseCampaniaContenidoPeer
} // if joined row is not null } // if joined row is not null
// Add objects for joined Disposicion rows // Add objects for joined DisposicionColumnas rows
$key3 = DisposicionPeer::getPrimaryKeyHashFromRow($row, $startcol3); $key3 = DisposicionColumnasPeer::getPrimaryKeyHashFromRow($row, $startcol3);
if ($key3 !== null) { if ($key3 !== null) {
$obj3 = DisposicionPeer::getInstanceFromPool($key3); $obj3 = DisposicionColumnasPeer::getInstanceFromPool($key3);
if (!$obj3) { if (!$obj3) {
$cls = DisposicionPeer::getOMClass(); $cls = DisposicionColumnasPeer::getOMClass();
$obj3 = new $cls(); $obj3 = new $cls();
$obj3->hydrate($row, $startcol3); $obj3->hydrate($row, $startcol3);
DisposicionPeer::addInstanceToPool($obj3, $key3); DisposicionColumnasPeer::addInstanceToPool($obj3, $key3);
} // if $obj3 already loaded } // if $obj3 already loaded
// Add the $obj1 (CampaniaContenido) to the collection in $obj3 (Disposicion) // Add the $obj1 (CampaniaContenido) to the collection in $obj3 (DisposicionColumnas)
$obj3->addCampaniaContenido($obj1); $obj3->addCampaniaContenido($obj1);
} // if joined row is not null } // if joined row is not null
// Add objects for joined Seccion rows // Add objects for joined Disposicion rows
$key4 = SeccionPeer::getPrimaryKeyHashFromRow($row, $startcol4); $key4 = DisposicionPeer::getPrimaryKeyHashFromRow($row, $startcol4);
if ($key4 !== null) { if ($key4 !== null) {
$obj4 = SeccionPeer::getInstanceFromPool($key4); $obj4 = DisposicionPeer::getInstanceFromPool($key4);
if (!$obj4) { if (!$obj4) {
$cls = SeccionPeer::getOMClass(); $cls = DisposicionPeer::getOMClass();
$obj4 = new $cls(); $obj4 = new $cls();
$obj4->hydrate($row, $startcol4); $obj4->hydrate($row, $startcol4);
SeccionPeer::addInstanceToPool($obj4, $key4); DisposicionPeer::addInstanceToPool($obj4, $key4);
} // if $obj4 already loaded } // if $obj4 already loaded
// Add the $obj1 (CampaniaContenido) to the collection in $obj4 (Seccion) // Add the $obj1 (CampaniaContenido) to the collection in $obj4 (Disposicion)
$obj4->addCampaniaContenido($obj1); $obj4->addCampaniaContenido($obj1);
} // if joined row is not null
// Add objects for joined Seccion rows
$key5 = SeccionPeer::getPrimaryKeyHashFromRow($row, $startcol5);
if ($key5 !== null) {
$obj5 = SeccionPeer::getInstanceFromPool($key5);
if (!$obj5) {
$cls = SeccionPeer::getOMClass();
$obj5 = new $cls();
$obj5->hydrate($row, $startcol5);
SeccionPeer::addInstanceToPool($obj5, $key5);
} // if $obj5 already loaded
// Add the $obj1 (CampaniaContenido) to the collection in $obj5 (Seccion)
$obj5->addCampaniaContenido($obj1);
} // if joined row is not null } // if joined row is not null
$results[] = $obj1; $results[] = $obj1;
...@@ -1806,14 +2238,19 @@ abstract class BaseCampaniaContenidoPeer ...@@ -1806,14 +2238,19 @@ abstract class BaseCampaniaContenidoPeer
CampaniaPeer::addSelectColumns($criteria); CampaniaPeer::addSelectColumns($criteria);
$startcol3 = $startcol2 + CampaniaPeer::NUM_HYDRATE_COLUMNS; $startcol3 = $startcol2 + CampaniaPeer::NUM_HYDRATE_COLUMNS;
DisposicionColumnasPeer::addSelectColumns($criteria);
$startcol4 = $startcol3 + DisposicionColumnasPeer::NUM_HYDRATE_COLUMNS;
DisposicionPeer::addSelectColumns($criteria); DisposicionPeer::addSelectColumns($criteria);
$startcol4 = $startcol3 + DisposicionPeer::NUM_HYDRATE_COLUMNS; $startcol5 = $startcol4 + DisposicionPeer::NUM_HYDRATE_COLUMNS;
FilaPeer::addSelectColumns($criteria); FilaPeer::addSelectColumns($criteria);
$startcol5 = $startcol4 + FilaPeer::NUM_HYDRATE_COLUMNS; $startcol6 = $startcol5 + FilaPeer::NUM_HYDRATE_COLUMNS;
$criteria->addJoin(CampaniaContenidoPeer::CAM_ID, CampaniaPeer::CAM_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::CAM_ID, CampaniaPeer::CAM_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::DCO_ID, DisposicionColumnasPeer::DCO_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::DIS_ID, DisposicionPeer::DIS_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::DIS_ID, DisposicionPeer::DIS_ID, $join_behavior);
$criteria->addJoin(CampaniaContenidoPeer::FIL_ID, FilaPeer::FIL_ID, $join_behavior); $criteria->addJoin(CampaniaContenidoPeer::FIL_ID, FilaPeer::FIL_ID, $join_behavior);
...@@ -1855,42 +2292,61 @@ abstract class BaseCampaniaContenidoPeer ...@@ -1855,42 +2292,61 @@ abstract class BaseCampaniaContenidoPeer
} // if joined row is not null } // if joined row is not null
// Add objects for joined Disposicion rows // Add objects for joined DisposicionColumnas rows
$key3 = DisposicionPeer::getPrimaryKeyHashFromRow($row, $startcol3); $key3 = DisposicionColumnasPeer::getPrimaryKeyHashFromRow($row, $startcol3);
if ($key3 !== null) { if ($key3 !== null) {
$obj3 = DisposicionPeer::getInstanceFromPool($key3); $obj3 = DisposicionColumnasPeer::getInstanceFromPool($key3);
if (!$obj3) { if (!$obj3) {
$cls = DisposicionPeer::getOMClass(); $cls = DisposicionColumnasPeer::getOMClass();
$obj3 = new $cls(); $obj3 = new $cls();
$obj3->hydrate($row, $startcol3); $obj3->hydrate($row, $startcol3);
DisposicionPeer::addInstanceToPool($obj3, $key3); DisposicionColumnasPeer::addInstanceToPool($obj3, $key3);
} // if $obj3 already loaded } // if $obj3 already loaded
// Add the $obj1 (CampaniaContenido) to the collection in $obj3 (Disposicion) // Add the $obj1 (CampaniaContenido) to the collection in $obj3 (DisposicionColumnas)
$obj3->addCampaniaContenido($obj1); $obj3->addCampaniaContenido($obj1);
} // if joined row is not null } // if joined row is not null
// Add objects for joined Fila rows // Add objects for joined Disposicion rows
$key4 = FilaPeer::getPrimaryKeyHashFromRow($row, $startcol4); $key4 = DisposicionPeer::getPrimaryKeyHashFromRow($row, $startcol4);
if ($key4 !== null) { if ($key4 !== null) {
$obj4 = FilaPeer::getInstanceFromPool($key4); $obj4 = DisposicionPeer::getInstanceFromPool($key4);
if (!$obj4) { if (!$obj4) {
$cls = FilaPeer::getOMClass(); $cls = DisposicionPeer::getOMClass();
$obj4 = new $cls(); $obj4 = new $cls();
$obj4->hydrate($row, $startcol4); $obj4->hydrate($row, $startcol4);
FilaPeer::addInstanceToPool($obj4, $key4); DisposicionPeer::addInstanceToPool($obj4, $key4);
} // if $obj4 already loaded } // if $obj4 already loaded
// Add the $obj1 (CampaniaContenido) to the collection in $obj4 (Fila) // Add the $obj1 (CampaniaContenido) to the collection in $obj4 (Disposicion)
$obj4->addCampaniaContenido($obj1); $obj4->addCampaniaContenido($obj1);
} // if joined row is not null
// Add objects for joined Fila rows
$key5 = FilaPeer::getPrimaryKeyHashFromRow($row, $startcol5);
if ($key5 !== null) {
$obj5 = FilaPeer::getInstanceFromPool($key5);
if (!$obj5) {
$cls = FilaPeer::getOMClass();
$obj5 = new $cls();
$obj5->hydrate($row, $startcol5);
FilaPeer::addInstanceToPool($obj5, $key5);
} // if $obj5 already loaded
// Add the $obj1 (CampaniaContenido) to the collection in $obj5 (Fila)
$obj5->addCampaniaContenido($obj1);
} // if joined row is not null } // if joined row is not null
$results[] = $obj1; $results[] = $obj1;
......
...@@ -17,6 +17,7 @@ use AppBundle\Model\CampaniaContenido; ...@@ -17,6 +17,7 @@ use AppBundle\Model\CampaniaContenido;
use AppBundle\Model\CampaniaContenidoPeer; use AppBundle\Model\CampaniaContenidoPeer;
use AppBundle\Model\CampaniaContenidoQuery; use AppBundle\Model\CampaniaContenidoQuery;
use AppBundle\Model\Disposicion; use AppBundle\Model\Disposicion;
use AppBundle\Model\DisposicionColumnas;
use AppBundle\Model\Fila; use AppBundle\Model\Fila;
use AppBundle\Model\Seccion; use AppBundle\Model\Seccion;
...@@ -24,6 +25,7 @@ use AppBundle\Model\Seccion; ...@@ -24,6 +25,7 @@ use AppBundle\Model\Seccion;
* @method CampaniaContenidoQuery orderByCcoId($order = Criteria::ASC) Order by the cco_id column * @method CampaniaContenidoQuery orderByCcoId($order = Criteria::ASC) Order by the cco_id column
* @method CampaniaContenidoQuery orderByCamId($order = Criteria::ASC) Order by the cam_id column * @method CampaniaContenidoQuery orderByCamId($order = Criteria::ASC) Order by the cam_id column
* @method CampaniaContenidoQuery orderByDisId($order = Criteria::ASC) Order by the dis_id column * @method CampaniaContenidoQuery orderByDisId($order = Criteria::ASC) Order by the dis_id column
* @method CampaniaContenidoQuery orderByDcoId($order = Criteria::ASC) Order by the dco_id column
* @method CampaniaContenidoQuery orderBySecId($order = Criteria::ASC) Order by the sec_id column * @method CampaniaContenidoQuery orderBySecId($order = Criteria::ASC) Order by the sec_id column
* @method CampaniaContenidoQuery orderByFilId($order = Criteria::ASC) Order by the fil_id column * @method CampaniaContenidoQuery orderByFilId($order = Criteria::ASC) Order by the fil_id column
* @method CampaniaContenidoQuery orderByCcoEntorno($order = Criteria::ASC) Order by the cco_entorno column * @method CampaniaContenidoQuery orderByCcoEntorno($order = Criteria::ASC) Order by the cco_entorno column
...@@ -39,6 +41,7 @@ use AppBundle\Model\Seccion; ...@@ -39,6 +41,7 @@ use AppBundle\Model\Seccion;
* @method CampaniaContenidoQuery groupByCcoId() Group by the cco_id column * @method CampaniaContenidoQuery groupByCcoId() Group by the cco_id column
* @method CampaniaContenidoQuery groupByCamId() Group by the cam_id column * @method CampaniaContenidoQuery groupByCamId() Group by the cam_id column
* @method CampaniaContenidoQuery groupByDisId() Group by the dis_id column * @method CampaniaContenidoQuery groupByDisId() Group by the dis_id column
* @method CampaniaContenidoQuery groupByDcoId() Group by the dco_id column
* @method CampaniaContenidoQuery groupBySecId() Group by the sec_id column * @method CampaniaContenidoQuery groupBySecId() Group by the sec_id column
* @method CampaniaContenidoQuery groupByFilId() Group by the fil_id column * @method CampaniaContenidoQuery groupByFilId() Group by the fil_id column
* @method CampaniaContenidoQuery groupByCcoEntorno() Group by the cco_entorno column * @method CampaniaContenidoQuery groupByCcoEntorno() Group by the cco_entorno column
...@@ -59,6 +62,10 @@ use AppBundle\Model\Seccion; ...@@ -59,6 +62,10 @@ use AppBundle\Model\Seccion;
* @method CampaniaContenidoQuery rightJoinCampania($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Campania relation * @method CampaniaContenidoQuery rightJoinCampania($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Campania relation
* @method CampaniaContenidoQuery innerJoinCampania($relationAlias = null) Adds a INNER JOIN clause to the query using the Campania relation * @method CampaniaContenidoQuery innerJoinCampania($relationAlias = null) Adds a INNER JOIN clause to the query using the Campania relation
* *
* @method CampaniaContenidoQuery leftJoinDisposicionColumnas($relationAlias = null) Adds a LEFT JOIN clause to the query using the DisposicionColumnas relation
* @method CampaniaContenidoQuery rightJoinDisposicionColumnas($relationAlias = null) Adds a RIGHT JOIN clause to the query using the DisposicionColumnas relation
* @method CampaniaContenidoQuery innerJoinDisposicionColumnas($relationAlias = null) Adds a INNER JOIN clause to the query using the DisposicionColumnas relation
*
* @method CampaniaContenidoQuery leftJoinDisposicion($relationAlias = null) Adds a LEFT JOIN clause to the query using the Disposicion relation * @method CampaniaContenidoQuery leftJoinDisposicion($relationAlias = null) Adds a LEFT JOIN clause to the query using the Disposicion relation
* @method CampaniaContenidoQuery rightJoinDisposicion($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Disposicion relation * @method CampaniaContenidoQuery rightJoinDisposicion($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Disposicion relation
* @method CampaniaContenidoQuery innerJoinDisposicion($relationAlias = null) Adds a INNER JOIN clause to the query using the Disposicion relation * @method CampaniaContenidoQuery innerJoinDisposicion($relationAlias = null) Adds a INNER JOIN clause to the query using the Disposicion relation
...@@ -76,6 +83,7 @@ use AppBundle\Model\Seccion; ...@@ -76,6 +83,7 @@ use AppBundle\Model\Seccion;
* *
* @method CampaniaContenido findOneByCamId(int $cam_id) Return the first CampaniaContenido filtered by the cam_id column * @method CampaniaContenido findOneByCamId(int $cam_id) Return the first CampaniaContenido filtered by the cam_id column
* @method CampaniaContenido findOneByDisId(int $dis_id) Return the first CampaniaContenido filtered by the dis_id column * @method CampaniaContenido findOneByDisId(int $dis_id) Return the first CampaniaContenido filtered by the dis_id column
* @method CampaniaContenido findOneByDcoId(int $dco_id) Return the first CampaniaContenido filtered by the dco_id column
* @method CampaniaContenido findOneBySecId(int $sec_id) Return the first CampaniaContenido filtered by the sec_id column * @method CampaniaContenido findOneBySecId(int $sec_id) Return the first CampaniaContenido filtered by the sec_id column
* @method CampaniaContenido findOneByFilId(int $fil_id) Return the first CampaniaContenido filtered by the fil_id column * @method CampaniaContenido findOneByFilId(int $fil_id) Return the first CampaniaContenido filtered by the fil_id column
* @method CampaniaContenido findOneByCcoEntorno(int $cco_entorno) Return the first CampaniaContenido filtered by the cco_entorno column * @method CampaniaContenido findOneByCcoEntorno(int $cco_entorno) Return the first CampaniaContenido filtered by the cco_entorno column
...@@ -91,6 +99,7 @@ use AppBundle\Model\Seccion; ...@@ -91,6 +99,7 @@ use AppBundle\Model\Seccion;
* @method array findByCcoId(int $cco_id) Return CampaniaContenido objects filtered by the cco_id column * @method array findByCcoId(int $cco_id) Return CampaniaContenido objects filtered by the cco_id column
* @method array findByCamId(int $cam_id) Return CampaniaContenido objects filtered by the cam_id column * @method array findByCamId(int $cam_id) Return CampaniaContenido objects filtered by the cam_id column
* @method array findByDisId(int $dis_id) Return CampaniaContenido objects filtered by the dis_id column * @method array findByDisId(int $dis_id) Return CampaniaContenido objects filtered by the dis_id column
* @method array findByDcoId(int $dco_id) Return CampaniaContenido objects filtered by the dco_id column
* @method array findBySecId(int $sec_id) Return CampaniaContenido objects filtered by the sec_id column * @method array findBySecId(int $sec_id) Return CampaniaContenido objects filtered by the sec_id column
* @method array findByFilId(int $fil_id) Return CampaniaContenido objects filtered by the fil_id column * @method array findByFilId(int $fil_id) Return CampaniaContenido objects filtered by the fil_id column
* @method array findByCcoEntorno(int $cco_entorno) Return CampaniaContenido objects filtered by the cco_entorno column * @method array findByCcoEntorno(int $cco_entorno) Return CampaniaContenido objects filtered by the cco_entorno column
...@@ -207,7 +216,7 @@ abstract class BaseCampaniaContenidoQuery extends ModelCriteria ...@@ -207,7 +216,7 @@ abstract class BaseCampaniaContenidoQuery extends ModelCriteria
*/ */
protected function findPkSimple($key, $con) protected function findPkSimple($key, $con)
{ {
$sql = 'SELECT `cco_id`, `cam_id`, `dis_id`, `sec_id`, `fil_id`, `cco_entorno`, `cco_contenido`, `cco_columna`, `cco_orden`, `cco_tipo`, `cco_estado`, `cco_eliminado`, `created_at`, `updated_at` FROM `campania_contenido` WHERE `cco_id` = :p0'; $sql = 'SELECT `cco_id`, `cam_id`, `dis_id`, `dco_id`, `sec_id`, `fil_id`, `cco_entorno`, `cco_contenido`, `cco_columna`, `cco_orden`, `cco_tipo`, `cco_estado`, `cco_eliminado`, `created_at`, `updated_at` FROM `campania_contenido` WHERE `cco_id` = :p0';
try { try {
$stmt = $con->prepare($sql); $stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT); $stmt->bindValue(':p0', $key, PDO::PARAM_INT);
...@@ -426,6 +435,50 @@ abstract class BaseCampaniaContenidoQuery extends ModelCriteria ...@@ -426,6 +435,50 @@ abstract class BaseCampaniaContenidoQuery extends ModelCriteria
return $this->addUsingAlias(CampaniaContenidoPeer::DIS_ID, $disId, $comparison); return $this->addUsingAlias(CampaniaContenidoPeer::DIS_ID, $disId, $comparison);
} }
/**
* Filter the query on the dco_id column
*
* Example usage:
* <code>
* $query->filterByDcoId(1234); // WHERE dco_id = 1234
* $query->filterByDcoId(array(12, 34)); // WHERE dco_id IN (12, 34)
* $query->filterByDcoId(array('min' => 12)); // WHERE dco_id >= 12
* $query->filterByDcoId(array('max' => 12)); // WHERE dco_id <= 12
* </code>
*
* @see filterByDisposicionColumnas()
*
* @param mixed $dcoId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CampaniaContenidoQuery The current query, for fluid interface
*/
public function filterByDcoId($dcoId = null, $comparison = null)
{
if (is_array($dcoId)) {
$useMinMax = false;
if (isset($dcoId['min'])) {
$this->addUsingAlias(CampaniaContenidoPeer::DCO_ID, $dcoId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dcoId['max'])) {
$this->addUsingAlias(CampaniaContenidoPeer::DCO_ID, $dcoId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CampaniaContenidoPeer::DCO_ID, $dcoId, $comparison);
}
/** /**
* Filter the query on the sec_id column * Filter the query on the sec_id column
* *
...@@ -957,6 +1010,82 @@ abstract class BaseCampaniaContenidoQuery extends ModelCriteria ...@@ -957,6 +1010,82 @@ abstract class BaseCampaniaContenidoQuery extends ModelCriteria
->useQuery($relationAlias ? $relationAlias : 'Campania', '\AppBundle\Model\CampaniaQuery'); ->useQuery($relationAlias ? $relationAlias : 'Campania', '\AppBundle\Model\CampaniaQuery');
} }
/**
* Filter the query by a related DisposicionColumnas object
*
* @param DisposicionColumnas|PropelObjectCollection $disposicionColumnas The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CampaniaContenidoQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByDisposicionColumnas($disposicionColumnas, $comparison = null)
{
if ($disposicionColumnas instanceof DisposicionColumnas) {
return $this
->addUsingAlias(CampaniaContenidoPeer::DCO_ID, $disposicionColumnas->getDcoId(), $comparison);
} elseif ($disposicionColumnas instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(CampaniaContenidoPeer::DCO_ID, $disposicionColumnas->toKeyValue('PrimaryKey', 'DcoId'), $comparison);
} else {
throw new PropelException('filterByDisposicionColumnas() only accepts arguments of type DisposicionColumnas or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the DisposicionColumnas relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CampaniaContenidoQuery The current query, for fluid interface
*/
public function joinDisposicionColumnas($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('DisposicionColumnas');
// 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, 'DisposicionColumnas');
}
return $this;
}
/**
* Use the DisposicionColumnas relation DisposicionColumnas 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\DisposicionColumnasQuery A secondary query class using the current class as primary query
*/
public function useDisposicionColumnasQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinDisposicionColumnas($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'DisposicionColumnas', '\AppBundle\Model\DisposicionColumnasQuery');
}
/** /**
* Filter the query by a related Disposicion object * Filter the query by a related Disposicion object
* *
......
...@@ -1219,6 +1219,31 @@ abstract class BaseDisposicion extends BaseObject implements Persistent ...@@ -1219,6 +1219,31 @@ abstract class BaseDisposicion extends BaseObject implements Persistent
} }
/**
* If this collection has already been initialized with
* an identical criteria, it returns the collection.
* Otherwise if this Disposicion is new, it will return
* an empty collection; or if this Disposicion has previously
* been saved, it will retrieve related CampaniaContenidos from storage.
*
* This method is protected by default in order to keep the public
* api reasonable. You can provide public methods for those you
* actually need in Disposicion.
*
* @param Criteria $criteria optional Criteria object to narrow the query
* @param PropelPDO $con optional connection object
* @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return PropelObjectCollection|CampaniaContenido[] List of CampaniaContenido objects
*/
public function getCampaniaContenidosJoinDisposicionColumnas($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$query = CampaniaContenidoQuery::create(null, $criteria);
$query->joinWith('DisposicionColumnas', $join_behavior);
return $this->getCampaniaContenidos($query, $con);
}
/** /**
* If this collection has already been initialized with * If this collection has already been initialized with
* an identical criteria, it returns the collection. * an identical criteria, it returns the collection.
......
...@@ -13,6 +13,8 @@ use \PropelCollection; ...@@ -13,6 +13,8 @@ use \PropelCollection;
use \PropelException; use \PropelException;
use \PropelObjectCollection; use \PropelObjectCollection;
use \PropelPDO; use \PropelPDO;
use AppBundle\Model\CampaniaContenido;
use AppBundle\Model\CampaniaContenidoQuery;
use AppBundle\Model\DisposicionColumnas; use AppBundle\Model\DisposicionColumnas;
use AppBundle\Model\DisposicionColumnasPeer; use AppBundle\Model\DisposicionColumnasPeer;
use AppBundle\Model\DisposicionColumnasQuery; use AppBundle\Model\DisposicionColumnasQuery;
...@@ -70,6 +72,12 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent ...@@ -70,6 +72,12 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent
*/ */
protected $dco_eliminado; protected $dco_eliminado;
/**
* @var PropelObjectCollection|CampaniaContenido[] Collection to store aggregation of CampaniaContenido objects.
*/
protected $collCampaniaContenidos;
protected $collCampaniaContenidosPartial;
/** /**
* @var PropelObjectCollection|Fila[] Collection to store aggregation of Fila objects. * @var PropelObjectCollection|Fila[] Collection to store aggregation of Fila objects.
*/ */
...@@ -96,6 +104,12 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent ...@@ -96,6 +104,12 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent
*/ */
protected $alreadyInClearAllReferencesDeep = false; protected $alreadyInClearAllReferencesDeep = false;
/**
* An array of objects scheduled for deletion.
* @var PropelObjectCollection
*/
protected $campaniaContenidosScheduledForDeletion = null;
/** /**
* An array of objects scheduled for deletion. * An array of objects scheduled for deletion.
* @var PropelObjectCollection * @var PropelObjectCollection
...@@ -370,6 +384,8 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent ...@@ -370,6 +384,8 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent
if ($deep) { // also de-associate any related objects? if ($deep) { // also de-associate any related objects?
$this->collCampaniaContenidos = null;
$this->collFilas = null; $this->collFilas = null;
} // if (deep) } // if (deep)
...@@ -496,6 +512,24 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent ...@@ -496,6 +512,24 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent
$this->resetModified(); $this->resetModified();
} }
if ($this->campaniaContenidosScheduledForDeletion !== null) {
if (!$this->campaniaContenidosScheduledForDeletion->isEmpty()) {
foreach ($this->campaniaContenidosScheduledForDeletion as $campaniaContenido) {
// need to save related object because we set the relation to null
$campaniaContenido->save($con);
}
$this->campaniaContenidosScheduledForDeletion = null;
}
}
if ($this->collCampaniaContenidos !== null) {
foreach ($this->collCampaniaContenidos as $referrerFK) {
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
$affectedRows += $referrerFK->save($con);
}
}
}
if ($this->filasScheduledForDeletion !== null) { if ($this->filasScheduledForDeletion !== null) {
if (!$this->filasScheduledForDeletion->isEmpty()) { if (!$this->filasScheduledForDeletion->isEmpty()) {
foreach ($this->filasScheduledForDeletion as $fila) { foreach ($this->filasScheduledForDeletion as $fila) {
...@@ -680,6 +714,14 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent ...@@ -680,6 +714,14 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent
} }
if ($this->collCampaniaContenidos !== null) {
foreach ($this->collCampaniaContenidos as $referrerFK) {
if (!$referrerFK->validate($columns)) {
$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
}
}
}
if ($this->collFilas !== null) { if ($this->collFilas !== null) {
foreach ($this->collFilas as $referrerFK) { foreach ($this->collFilas as $referrerFK) {
if (!$referrerFK->validate($columns)) { if (!$referrerFK->validate($columns)) {
...@@ -779,6 +821,9 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent ...@@ -779,6 +821,9 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent
} }
if ($includeForeignObjects) { if ($includeForeignObjects) {
if (null !== $this->collCampaniaContenidos) {
$result['CampaniaContenidos'] = $this->collCampaniaContenidos->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
}
if (null !== $this->collFilas) { if (null !== $this->collFilas) {
$result['Filas'] = $this->collFilas->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); $result['Filas'] = $this->collFilas->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
} }
...@@ -951,6 +996,12 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent ...@@ -951,6 +996,12 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent
// store object hash to prevent cycle // store object hash to prevent cycle
$this->startCopy = true; $this->startCopy = true;
foreach ($this->getCampaniaContenidos() as $relObj) {
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
$copyObj->addCampaniaContenido($relObj->copy($deepCopy));
}
}
foreach ($this->getFilas() as $relObj) { foreach ($this->getFilas() 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->addFila($relObj->copy($deepCopy)); $copyObj->addFila($relObj->copy($deepCopy));
...@@ -1018,11 +1069,339 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent ...@@ -1018,11 +1069,339 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent
*/ */
public function initRelation($relationName) public function initRelation($relationName)
{ {
if ('CampaniaContenido' == $relationName) {
$this->initCampaniaContenidos();
}
if ('Fila' == $relationName) { if ('Fila' == $relationName) {
$this->initFilas(); $this->initFilas();
} }
} }
/**
* Clears out the collCampaniaContenidos 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 DisposicionColumnas The current object (for fluent API support)
* @see addCampaniaContenidos()
*/
public function clearCampaniaContenidos()
{
$this->collCampaniaContenidos = null; // important to set this to null since that means it is uninitialized
$this->collCampaniaContenidosPartial = null;
return $this;
}
/**
* reset is the collCampaniaContenidos collection loaded partially
*
* @return void
*/
public function resetPartialCampaniaContenidos($v = true)
{
$this->collCampaniaContenidosPartial = $v;
}
/**
* Initializes the collCampaniaContenidos collection.
*
* By default this just sets the collCampaniaContenidos collection to an empty array (like clearcollCampaniaContenidos());
* 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 initCampaniaContenidos($overrideExisting = true)
{
if (null !== $this->collCampaniaContenidos && !$overrideExisting) {
return;
}
$this->collCampaniaContenidos = new PropelObjectCollection();
$this->collCampaniaContenidos->setModel('CampaniaContenido');
}
/**
* Gets an array of CampaniaContenido 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 DisposicionColumnas 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|CampaniaContenido[] List of CampaniaContenido objects
* @throws PropelException
*/
public function getCampaniaContenidos($criteria = null, PropelPDO $con = null)
{
$partial = $this->collCampaniaContenidosPartial && !$this->isNew();
if (null === $this->collCampaniaContenidos || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collCampaniaContenidos) {
// return empty collection
$this->initCampaniaContenidos();
} else {
$collCampaniaContenidos = CampaniaContenidoQuery::create(null, $criteria)
->filterByDisposicionColumnas($this)
->find($con);
if (null !== $criteria) {
if (false !== $this->collCampaniaContenidosPartial && count($collCampaniaContenidos)) {
$this->initCampaniaContenidos(false);
foreach ($collCampaniaContenidos as $obj) {
if (false == $this->collCampaniaContenidos->contains($obj)) {
$this->collCampaniaContenidos->append($obj);
}
}
$this->collCampaniaContenidosPartial = true;
}
$collCampaniaContenidos->getInternalIterator()->rewind();
return $collCampaniaContenidos;
}
if ($partial && $this->collCampaniaContenidos) {
foreach ($this->collCampaniaContenidos as $obj) {
if ($obj->isNew()) {
$collCampaniaContenidos[] = $obj;
}
}
}
$this->collCampaniaContenidos = $collCampaniaContenidos;
$this->collCampaniaContenidosPartial = false;
}
}
return $this->collCampaniaContenidos;
}
/**
* Sets a collection of CampaniaContenido 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 $campaniaContenidos A Propel collection.
* @param PropelPDO $con Optional connection object
* @return DisposicionColumnas The current object (for fluent API support)
*/
public function setCampaniaContenidos(PropelCollection $campaniaContenidos, PropelPDO $con = null)
{
$campaniaContenidosToDelete = $this->getCampaniaContenidos(new Criteria(), $con)->diff($campaniaContenidos);
$this->campaniaContenidosScheduledForDeletion = $campaniaContenidosToDelete;
foreach ($campaniaContenidosToDelete as $campaniaContenidoRemoved) {
$campaniaContenidoRemoved->setDisposicionColumnas(null);
}
$this->collCampaniaContenidos = null;
foreach ($campaniaContenidos as $campaniaContenido) {
$this->addCampaniaContenido($campaniaContenido);
}
$this->collCampaniaContenidos = $campaniaContenidos;
$this->collCampaniaContenidosPartial = false;
return $this;
}
/**
* Returns the number of related CampaniaContenido objects.
*
* @param Criteria $criteria
* @param boolean $distinct
* @param PropelPDO $con
* @return int Count of related CampaniaContenido objects.
* @throws PropelException
*/
public function countCampaniaContenidos(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
{
$partial = $this->collCampaniaContenidosPartial && !$this->isNew();
if (null === $this->collCampaniaContenidos || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collCampaniaContenidos) {
return 0;
}
if ($partial && !$criteria) {
return count($this->getCampaniaContenidos());
}
$query = CampaniaContenidoQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByDisposicionColumnas($this)
->count($con);
}
return count($this->collCampaniaContenidos);
}
/**
* Method called to associate a CampaniaContenido object to this object
* through the CampaniaContenido foreign key attribute.
*
* @param CampaniaContenido $l CampaniaContenido
* @return DisposicionColumnas The current object (for fluent API support)
*/
public function addCampaniaContenido(CampaniaContenido $l)
{
if ($this->collCampaniaContenidos === null) {
$this->initCampaniaContenidos();
$this->collCampaniaContenidosPartial = true;
}
if (!in_array($l, $this->collCampaniaContenidos->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
$this->doAddCampaniaContenido($l);
if ($this->campaniaContenidosScheduledForDeletion and $this->campaniaContenidosScheduledForDeletion->contains($l)) {
$this->campaniaContenidosScheduledForDeletion->remove($this->campaniaContenidosScheduledForDeletion->search($l));
}
}
return $this;
}
/**
* @param CampaniaContenido $campaniaContenido The campaniaContenido object to add.
*/
protected function doAddCampaniaContenido($campaniaContenido)
{
$this->collCampaniaContenidos[]= $campaniaContenido;
$campaniaContenido->setDisposicionColumnas($this);
}
/**
* @param CampaniaContenido $campaniaContenido The campaniaContenido object to remove.
* @return DisposicionColumnas The current object (for fluent API support)
*/
public function removeCampaniaContenido($campaniaContenido)
{
if ($this->getCampaniaContenidos()->contains($campaniaContenido)) {
$this->collCampaniaContenidos->remove($this->collCampaniaContenidos->search($campaniaContenido));
if (null === $this->campaniaContenidosScheduledForDeletion) {
$this->campaniaContenidosScheduledForDeletion = clone $this->collCampaniaContenidos;
$this->campaniaContenidosScheduledForDeletion->clear();
}
$this->campaniaContenidosScheduledForDeletion[]= $campaniaContenido;
$campaniaContenido->setDisposicionColumnas(null);
}
return $this;
}
/**
* If this collection has already been initialized with
* an identical criteria, it returns the collection.
* Otherwise if this DisposicionColumnas is new, it will return
* an empty collection; or if this DisposicionColumnas has previously
* been saved, it will retrieve related CampaniaContenidos from storage.
*
* This method is protected by default in order to keep the public
* api reasonable. You can provide public methods for those you
* actually need in DisposicionColumnas.
*
* @param Criteria $criteria optional Criteria object to narrow the query
* @param PropelPDO $con optional connection object
* @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return PropelObjectCollection|CampaniaContenido[] List of CampaniaContenido objects
*/
public function getCampaniaContenidosJoinCampania($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$query = CampaniaContenidoQuery::create(null, $criteria);
$query->joinWith('Campania', $join_behavior);
return $this->getCampaniaContenidos($query, $con);
}
/**
* If this collection has already been initialized with
* an identical criteria, it returns the collection.
* Otherwise if this DisposicionColumnas is new, it will return
* an empty collection; or if this DisposicionColumnas has previously
* been saved, it will retrieve related CampaniaContenidos from storage.
*
* This method is protected by default in order to keep the public
* api reasonable. You can provide public methods for those you
* actually need in DisposicionColumnas.
*
* @param Criteria $criteria optional Criteria object to narrow the query
* @param PropelPDO $con optional connection object
* @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return PropelObjectCollection|CampaniaContenido[] List of CampaniaContenido objects
*/
public function getCampaniaContenidosJoinDisposicion($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$query = CampaniaContenidoQuery::create(null, $criteria);
$query->joinWith('Disposicion', $join_behavior);
return $this->getCampaniaContenidos($query, $con);
}
/**
* If this collection has already been initialized with
* an identical criteria, it returns the collection.
* Otherwise if this DisposicionColumnas is new, it will return
* an empty collection; or if this DisposicionColumnas has previously
* been saved, it will retrieve related CampaniaContenidos from storage.
*
* This method is protected by default in order to keep the public
* api reasonable. You can provide public methods for those you
* actually need in DisposicionColumnas.
*
* @param Criteria $criteria optional Criteria object to narrow the query
* @param PropelPDO $con optional connection object
* @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return PropelObjectCollection|CampaniaContenido[] List of CampaniaContenido objects
*/
public function getCampaniaContenidosJoinFila($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$query = CampaniaContenidoQuery::create(null, $criteria);
$query->joinWith('Fila', $join_behavior);
return $this->getCampaniaContenidos($query, $con);
}
/**
* If this collection has already been initialized with
* an identical criteria, it returns the collection.
* Otherwise if this DisposicionColumnas is new, it will return
* an empty collection; or if this DisposicionColumnas has previously
* been saved, it will retrieve related CampaniaContenidos from storage.
*
* This method is protected by default in order to keep the public
* api reasonable. You can provide public methods for those you
* actually need in DisposicionColumnas.
*
* @param Criteria $criteria optional Criteria object to narrow the query
* @param PropelPDO $con optional connection object
* @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return PropelObjectCollection|CampaniaContenido[] List of CampaniaContenido objects
*/
public function getCampaniaContenidosJoinSeccion($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$query = CampaniaContenidoQuery::create(null, $criteria);
$query->joinWith('Seccion', $join_behavior);
return $this->getCampaniaContenidos($query, $con);
}
/** /**
* Clears out the collFilas collection * Clears out the collFilas collection
* *
...@@ -1330,6 +1709,11 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent ...@@ -1330,6 +1709,11 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent
{ {
if ($deep && !$this->alreadyInClearAllReferencesDeep) { if ($deep && !$this->alreadyInClearAllReferencesDeep) {
$this->alreadyInClearAllReferencesDeep = true; $this->alreadyInClearAllReferencesDeep = true;
if ($this->collCampaniaContenidos) {
foreach ($this->collCampaniaContenidos as $o) {
$o->clearAllReferences($deep);
}
}
if ($this->collFilas) { if ($this->collFilas) {
foreach ($this->collFilas as $o) { foreach ($this->collFilas as $o) {
$o->clearAllReferences($deep); $o->clearAllReferences($deep);
...@@ -1339,6 +1723,10 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent ...@@ -1339,6 +1723,10 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent
$this->alreadyInClearAllReferencesDeep = false; $this->alreadyInClearAllReferencesDeep = false;
} // if ($deep) } // if ($deep)
if ($this->collCampaniaContenidos instanceof PropelCollection) {
$this->collCampaniaContenidos->clearIterator();
}
$this->collCampaniaContenidos = null;
if ($this->collFilas instanceof PropelCollection) { if ($this->collFilas instanceof PropelCollection) {
$this->collFilas->clearIterator(); $this->collFilas->clearIterator();
} }
......
...@@ -12,6 +12,7 @@ use \PropelCollection; ...@@ -12,6 +12,7 @@ use \PropelCollection;
use \PropelException; use \PropelException;
use \PropelObjectCollection; use \PropelObjectCollection;
use \PropelPDO; use \PropelPDO;
use AppBundle\Model\CampaniaContenido;
use AppBundle\Model\DisposicionColumnas; use AppBundle\Model\DisposicionColumnas;
use AppBundle\Model\DisposicionColumnasPeer; use AppBundle\Model\DisposicionColumnasPeer;
use AppBundle\Model\DisposicionColumnasQuery; use AppBundle\Model\DisposicionColumnasQuery;
...@@ -34,6 +35,10 @@ use AppBundle\Model\Fila; ...@@ -34,6 +35,10 @@ use AppBundle\Model\Fila;
* @method DisposicionColumnasQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query * @method DisposicionColumnasQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method DisposicionColumnasQuery innerJoin($relation) Adds a INNER JOIN clause to the query * @method DisposicionColumnasQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* *
* @method DisposicionColumnasQuery leftJoinCampaniaContenido($relationAlias = null) Adds a LEFT JOIN clause to the query using the CampaniaContenido relation
* @method DisposicionColumnasQuery rightJoinCampaniaContenido($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CampaniaContenido relation
* @method DisposicionColumnasQuery innerJoinCampaniaContenido($relationAlias = null) Adds a INNER JOIN clause to the query using the CampaniaContenido relation
*
* @method DisposicionColumnasQuery leftJoinFila($relationAlias = null) Adds a LEFT JOIN clause to the query using the Fila relation * @method DisposicionColumnasQuery leftJoinFila($relationAlias = null) Adds a LEFT JOIN clause to the query using the Fila relation
* @method DisposicionColumnasQuery rightJoinFila($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Fila relation * @method DisposicionColumnasQuery rightJoinFila($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Fila relation
* @method DisposicionColumnasQuery innerJoinFila($relationAlias = null) Adds a INNER JOIN clause to the query using the Fila relation * @method DisposicionColumnasQuery innerJoinFila($relationAlias = null) Adds a INNER JOIN clause to the query using the Fila relation
...@@ -442,6 +447,80 @@ abstract class BaseDisposicionColumnasQuery extends ModelCriteria ...@@ -442,6 +447,80 @@ abstract class BaseDisposicionColumnasQuery extends ModelCriteria
return $this->addUsingAlias(DisposicionColumnasPeer::DCO_ELIMINADO, $dcoEliminado, $comparison); return $this->addUsingAlias(DisposicionColumnasPeer::DCO_ELIMINADO, $dcoEliminado, $comparison);
} }
/**
* Filter the query by a related CampaniaContenido object
*
* @param CampaniaContenido|PropelObjectCollection $campaniaContenido the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return DisposicionColumnasQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCampaniaContenido($campaniaContenido, $comparison = null)
{
if ($campaniaContenido instanceof CampaniaContenido) {
return $this
->addUsingAlias(DisposicionColumnasPeer::DCO_ID, $campaniaContenido->getDcoId(), $comparison);
} elseif ($campaniaContenido instanceof PropelObjectCollection) {
return $this
->useCampaniaContenidoQuery()
->filterByPrimaryKeys($campaniaContenido->getPrimaryKeys())
->endUse();
} else {
throw new PropelException('filterByCampaniaContenido() only accepts arguments of type CampaniaContenido or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the CampaniaContenido relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return DisposicionColumnasQuery The current query, for fluid interface
*/
public function joinCampaniaContenido($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CampaniaContenido');
// 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, 'CampaniaContenido');
}
return $this;
}
/**
* Use the CampaniaContenido relation CampaniaContenido 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\CampaniaContenidoQuery A secondary query class using the current class as primary query
*/
public function useCampaniaContenidoQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinCampaniaContenido($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CampaniaContenido', '\AppBundle\Model\CampaniaContenidoQuery');
}
/** /**
* Filter the query by a related Fila object * Filter the query by a related Fila object
* *
......
...@@ -1910,6 +1910,31 @@ abstract class BaseFila extends BaseObject implements Persistent ...@@ -1910,6 +1910,31 @@ abstract class BaseFila extends BaseObject implements Persistent
} }
/**
* If this collection has already been initialized with
* an identical criteria, it returns the collection.
* Otherwise if this Fila is new, it will return
* an empty collection; or if this Fila has previously
* been saved, it will retrieve related CampaniaContenidos from storage.
*
* This method is protected by default in order to keep the public
* api reasonable. You can provide public methods for those you
* actually need in Fila.
*
* @param Criteria $criteria optional Criteria object to narrow the query
* @param PropelPDO $con optional connection object
* @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return PropelObjectCollection|CampaniaContenido[] List of CampaniaContenido objects
*/
public function getCampaniaContenidosJoinDisposicionColumnas($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$query = CampaniaContenidoQuery::create(null, $criteria);
$query->joinWith('DisposicionColumnas', $join_behavior);
return $this->getCampaniaContenidos($query, $con);
}
/** /**
* If this collection has already been initialized with * If this collection has already been initialized with
* an identical criteria, it returns the collection. * an identical criteria, it returns the collection.
......
...@@ -1273,6 +1273,31 @@ abstract class BaseSeccion extends BaseObject implements Persistent ...@@ -1273,6 +1273,31 @@ abstract class BaseSeccion extends BaseObject implements Persistent
} }
/**
* If this collection has already been initialized with
* an identical criteria, it returns the collection.
* Otherwise if this Seccion is new, it will return
* an empty collection; or if this Seccion has previously
* been saved, it will retrieve related CampaniaContenidos from storage.
*
* This method is protected by default in order to keep the public
* api reasonable. You can provide public methods for those you
* actually need in Seccion.
*
* @param Criteria $criteria optional Criteria object to narrow the query
* @param PropelPDO $con optional connection object
* @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return PropelObjectCollection|CampaniaContenido[] List of CampaniaContenido objects
*/
public function getCampaniaContenidosJoinDisposicionColumnas($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$query = CampaniaContenidoQuery::create(null, $criteria);
$query->joinWith('DisposicionColumnas', $join_behavior);
return $this->getCampaniaContenidos($query, $con);
}
/** /**
* If this collection has already been initialized with * If this collection has already been initialized with
* an identical criteria, it returns the collection. * an identical criteria, it returns the collection.
......
...@@ -76,12 +76,13 @@ ...@@ -76,12 +76,13 @@
<table name="campania_contenido" phpName="CampaniaContenido" idMethod="native"> <table name="campania_contenido" phpName="CampaniaContenido" idMethod="native">
<column name="cco_id" phpName="CcoId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/> <column name="cco_id" phpName="CcoId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="cam_id" phpName="CamId" type="INTEGER" required="false"/> <column name="cam_id" phpName="CamId" type="INTEGER" required="false"/>
<column name="dis_id" phpName="DisId" type="INTEGER" size="6" required="false"/> <column name="dis_id" phpName="DisId" type="INTEGER" required="false"/>
<column name="sec_id" phpName="SecId" type="INTEGER" size="6" required="false"/> <column name="dco_id" phpName="DcoId" type="INTEGER" required="false"/>
<column name="fil_id" phpName="FilId" type="INTEGER" size="6" required="false"/> <column name="sec_id" phpName="SecId" type="INTEGER" required="false"/>
<column name="fil_id" phpName="FilId" type="INTEGER" required="false"/>
<column name="cco_entorno" phpName="CcoEntorno" type="INTEGER" required="false"/> <column name="cco_entorno" phpName="CcoEntorno" type="INTEGER" required="false"/>
<column name="cco_contenido" phpName="CcoContenido" type="LONGVARCHAR" required="false"/> <column name="cco_contenido" phpName="CcoContenido" type="LONGVARCHAR" required="false"/>
<column name="cco_columna" phpName="CcoColumna" type="INTEGER" size="6" required="false"/> <column name="cco_columna" phpName="CcoColumna" type="INTEGER" required="false"/>
<column name="cco_orden" phpName="CcoOrden" type="INTEGER" required="false"/> <column name="cco_orden" phpName="CcoOrden" type="INTEGER" required="false"/>
<column name="cco_tipo" phpName="CcoTipo" type="INTEGER" required="false"/> <column name="cco_tipo" phpName="CcoTipo" type="INTEGER" required="false"/>
<column name="cco_estado" phpName="CcoEstado" type="INTEGER" required="false"/> <column name="cco_estado" phpName="CcoEstado" type="INTEGER" required="false"/>
...@@ -90,6 +91,9 @@ ...@@ -90,6 +91,9 @@
<foreign-key foreignTable="campania" name="fk_cam_pk_fk" onDelete="RESTRICT" onUpdate="RESTRICT"> <foreign-key foreignTable="campania" name="fk_cam_pk_fk" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference local="cam_id" foreign="cam_id"/> <reference local="cam_id" foreign="cam_id"/>
</foreign-key> </foreign-key>
<foreign-key foreignTable="disposicion_columnas" name="fk_dis_col_pk_fk" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference local="dco_id" foreign="dco_id"/>
</foreign-key>
<foreign-key foreignTable="disposicion" name="fk_dis_pk_fk" onDelete="RESTRICT" onUpdate="RESTRICT"> <foreign-key foreignTable="disposicion" name="fk_dis_pk_fk" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference local="dis_id" foreign="dis_id"/> <reference local="dis_id" foreign="dis_id"/>
</foreign-key> </foreign-key>
...@@ -111,6 +115,9 @@ ...@@ -111,6 +115,9 @@
<index name="fk_fil_pk_fk_idx"> <index name="fk_fil_pk_fk_idx">
<index-column name="fil_id"/> <index-column name="fil_id"/>
</index> </index>
<index name="fk_dis_col_pk_fk_idx">
<index-column name="dco_id"/>
</index>
<vendor type="mysql"> <vendor type="mysql">
<parameter name="Engine" value="InnoDB"/> <parameter name="Engine" value="InnoDB"/>
</vendor> </vendor>
......
...@@ -329,7 +329,8 @@ class CampaniaController extends Controller { ...@@ -329,7 +329,8 @@ class CampaniaController extends Controller {
$log->debug("generando contenido nuevo asociado a la camapaña $campaniaId..."); $log->debug("generando contenido nuevo asociado a la camapaña $campaniaId...");
$contenidoCampania = new CampaniaContenido(); $contenidoCampania = new CampaniaContenido();
$contenidoCampania->setCamId($campaniaId); $contenidoCampania->setCamId($campaniaId);
$contenidoCampania->setDisId($disposicionId); $contenidoCampania->setDisId($entorno);
$contenidoCampania->setDcoId($disposicionId);
$contenidoCampania->setSecId($seccionId); $contenidoCampania->setSecId($seccionId);
$contenidoCampania->setFilId($filaId); $contenidoCampania->setFilId($filaId);
$contenidoCampania->setCcoContenido($contenido); $contenidoCampania->setCcoContenido($contenido);
......
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