beginning of making a separate ShowInstance vs Show class.
This commit is contained in:
parent
bc6dd374f4
commit
bfc1bccfdf
18 changed files with 672 additions and 825 deletions
|
@ -51,6 +51,7 @@ class CcShowInstancesTableMap extends TableMap {
|
|||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CcShow', 'CcShow', RelationMap::MANY_TO_ONE, array('show_id' => 'id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcShowSchedule', 'CcShowSchedule', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
} // CcShowInstancesTableMap
|
||||
|
|
|
@ -39,8 +39,7 @@ class CcShowScheduleTableMap extends TableMap {
|
|||
$this->setPrimaryKeyMethodInfo('cc_show_schedule_id_seq');
|
||||
// columns
|
||||
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
|
||||
$this->addForeignKey('SHOW_ID', 'DbShowId', 'INTEGER', 'cc_show', 'ID', true, null, null);
|
||||
$this->addColumn('SHOW_DAY', 'DbShowDay', 'DATE', true, null, null);
|
||||
$this->addForeignKey('INSTANCE_ID', 'DbInstanceId', 'INTEGER', 'cc_show_instances', 'ID', true, null, null);
|
||||
$this->addColumn('POSITION', 'DbPosition', 'INTEGER', false, null, null);
|
||||
$this->addColumn('GROUP_ID', 'DbGroupId', 'INTEGER', true, null, null);
|
||||
// validators
|
||||
|
@ -51,7 +50,7 @@ class CcShowScheduleTableMap extends TableMap {
|
|||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CcShow', 'CcShow', RelationMap::MANY_TO_ONE, array('show_id' => 'id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcShowInstances', 'CcShowInstances', RelationMap::MANY_TO_ONE, array('instance_id' => 'id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
} // CcShowScheduleTableMap
|
||||
|
|
|
@ -54,7 +54,6 @@ class CcShowTableMap extends TableMap {
|
|||
$this->addRelation('CcShowInstances', 'CcShowInstances', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcShowDays', 'CcShowDays', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcShowHosts', 'CcShowHosts', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcShowSchedule', 'CcShowSchedule', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
} // CcShowTableMap
|
||||
|
|
|
@ -70,11 +70,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
|||
*/
|
||||
protected $collCcShowHostss;
|
||||
|
||||
/**
|
||||
* @var array CcShowSchedule[] Collection to store aggregation of CcShowSchedule objects.
|
||||
*/
|
||||
protected $collCcShowSchedules;
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
* by another object which falls in this transaction.
|
||||
|
@ -377,8 +372,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
|||
|
||||
$this->collCcShowHostss = null;
|
||||
|
||||
$this->collCcShowSchedules = null;
|
||||
|
||||
} // if (deep)
|
||||
}
|
||||
|
||||
|
@ -536,14 +529,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
|||
}
|
||||
}
|
||||
|
||||
if ($this->collCcShowSchedules !== null) {
|
||||
foreach ($this->collCcShowSchedules as $referrerFK) {
|
||||
if (!$referrerFK->isDeleted()) {
|
||||
$affectedRows += $referrerFK->save($con);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->alreadyInSave = false;
|
||||
|
||||
}
|
||||
|
@ -639,14 +624,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
|||
}
|
||||
}
|
||||
|
||||
if ($this->collCcShowSchedules !== null) {
|
||||
foreach ($this->collCcShowSchedules as $referrerFK) {
|
||||
if (!$referrerFK->validate($columns)) {
|
||||
$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->alreadyInValidation = false;
|
||||
}
|
||||
|
@ -903,12 +880,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
|||
}
|
||||
}
|
||||
|
||||
foreach ($this->getCcShowSchedules() as $relObj) {
|
||||
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
|
||||
$copyObj->addCcShowSchedule($relObj->copy($deepCopy));
|
||||
}
|
||||
}
|
||||
|
||||
} // if ($deepCopy)
|
||||
|
||||
|
||||
|
@ -1306,115 +1277,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
|||
return $this->getCcShowHostss($query, $con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears out the collCcShowSchedules 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 void
|
||||
* @see addCcShowSchedules()
|
||||
*/
|
||||
public function clearCcShowSchedules()
|
||||
{
|
||||
$this->collCcShowSchedules = null; // important to set this to NULL since that means it is uninitialized
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the collCcShowSchedules collection.
|
||||
*
|
||||
* By default this just sets the collCcShowSchedules collection to an empty array (like clearcollCcShowSchedules());
|
||||
* 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.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function initCcShowSchedules()
|
||||
{
|
||||
$this->collCcShowSchedules = new PropelObjectCollection();
|
||||
$this->collCcShowSchedules->setModel('CcShowSchedule');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an array of CcShowSchedule 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 CcShow 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 PropelCollection|array CcShowSchedule[] List of CcShowSchedule objects
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getCcShowSchedules($criteria = null, PropelPDO $con = null)
|
||||
{
|
||||
if(null === $this->collCcShowSchedules || null !== $criteria) {
|
||||
if ($this->isNew() && null === $this->collCcShowSchedules) {
|
||||
// return empty collection
|
||||
$this->initCcShowSchedules();
|
||||
} else {
|
||||
$collCcShowSchedules = CcShowScheduleQuery::create(null, $criteria)
|
||||
->filterByCcShow($this)
|
||||
->find($con);
|
||||
if (null !== $criteria) {
|
||||
return $collCcShowSchedules;
|
||||
}
|
||||
$this->collCcShowSchedules = $collCcShowSchedules;
|
||||
}
|
||||
}
|
||||
return $this->collCcShowSchedules;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of related CcShowSchedule objects.
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct
|
||||
* @param PropelPDO $con
|
||||
* @return int Count of related CcShowSchedule objects.
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function countCcShowSchedules(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
|
||||
{
|
||||
if(null === $this->collCcShowSchedules || null !== $criteria) {
|
||||
if ($this->isNew() && null === $this->collCcShowSchedules) {
|
||||
return 0;
|
||||
} else {
|
||||
$query = CcShowScheduleQuery::create(null, $criteria);
|
||||
if($distinct) {
|
||||
$query->distinct();
|
||||
}
|
||||
return $query
|
||||
->filterByCcShow($this)
|
||||
->count($con);
|
||||
}
|
||||
} else {
|
||||
return count($this->collCcShowSchedules);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method called to associate a CcShowSchedule object to this object
|
||||
* through the CcShowSchedule foreign key attribute.
|
||||
*
|
||||
* @param CcShowSchedule $l CcShowSchedule
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function addCcShowSchedule(CcShowSchedule $l)
|
||||
{
|
||||
if ($this->collCcShowSchedules === null) {
|
||||
$this->initCcShowSchedules();
|
||||
}
|
||||
if (!$this->collCcShowSchedules->contains($l)) { // only add it if the **same** object is not already associated
|
||||
$this->collCcShowSchedules[]= $l;
|
||||
$l->setCcShow($this);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the current object and sets all attributes to their default values
|
||||
*/
|
||||
|
@ -1461,17 +1323,11 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
|||
$o->clearAllReferences($deep);
|
||||
}
|
||||
}
|
||||
if ($this->collCcShowSchedules) {
|
||||
foreach ((array) $this->collCcShowSchedules as $o) {
|
||||
$o->clearAllReferences($deep);
|
||||
}
|
||||
}
|
||||
} // if ($deep)
|
||||
|
||||
$this->collCcShowInstancess = null;
|
||||
$this->collCcShowDayss = null;
|
||||
$this->collCcShowHostss = null;
|
||||
$this->collCcShowSchedules = null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -53,6 +53,11 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent
|
|||
*/
|
||||
protected $aCcShow;
|
||||
|
||||
/**
|
||||
* @var array CcShowSchedule[] Collection to store aggregation of CcShowSchedule objects.
|
||||
*/
|
||||
protected $collCcShowSchedules;
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
* by another object which falls in this transaction.
|
||||
|
@ -405,6 +410,8 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent
|
|||
if ($deep) { // also de-associate any related objects?
|
||||
|
||||
$this->aCcShow = null;
|
||||
$this->collCcShowSchedules = null;
|
||||
|
||||
} // if (deep)
|
||||
}
|
||||
|
||||
|
@ -550,6 +557,14 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent
|
|||
$this->resetModified(); // [HL] After being saved an object is no longer 'modified'
|
||||
}
|
||||
|
||||
if ($this->collCcShowSchedules !== null) {
|
||||
foreach ($this->collCcShowSchedules as $referrerFK) {
|
||||
if (!$referrerFK->isDeleted()) {
|
||||
$affectedRows += $referrerFK->save($con);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->alreadyInSave = false;
|
||||
|
||||
}
|
||||
|
@ -633,6 +648,14 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent
|
|||
}
|
||||
|
||||
|
||||
if ($this->collCcShowSchedules !== null) {
|
||||
foreach ($this->collCcShowSchedules as $referrerFK) {
|
||||
if (!$referrerFK->validate($columns)) {
|
||||
$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->alreadyInValidation = false;
|
||||
}
|
||||
|
@ -862,6 +885,20 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent
|
|||
$copyObj->setDbEnds($this->ends);
|
||||
$copyObj->setDbShowId($this->show_id);
|
||||
|
||||
if ($deepCopy) {
|
||||
// important: temporarily setNew(false) because this affects the behavior of
|
||||
// the getter/setter methods for fkey referrer objects.
|
||||
$copyObj->setNew(false);
|
||||
|
||||
foreach ($this->getCcShowSchedules() as $relObj) {
|
||||
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
|
||||
$copyObj->addCcShowSchedule($relObj->copy($deepCopy));
|
||||
}
|
||||
}
|
||||
|
||||
} // if ($deepCopy)
|
||||
|
||||
|
||||
$copyObj->setNew(true);
|
||||
$copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value
|
||||
}
|
||||
|
@ -953,6 +990,115 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent
|
|||
return $this->aCcShow;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears out the collCcShowSchedules 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 void
|
||||
* @see addCcShowSchedules()
|
||||
*/
|
||||
public function clearCcShowSchedules()
|
||||
{
|
||||
$this->collCcShowSchedules = null; // important to set this to NULL since that means it is uninitialized
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the collCcShowSchedules collection.
|
||||
*
|
||||
* By default this just sets the collCcShowSchedules collection to an empty array (like clearcollCcShowSchedules());
|
||||
* 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.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function initCcShowSchedules()
|
||||
{
|
||||
$this->collCcShowSchedules = new PropelObjectCollection();
|
||||
$this->collCcShowSchedules->setModel('CcShowSchedule');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an array of CcShowSchedule 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 CcShowInstances 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 PropelCollection|array CcShowSchedule[] List of CcShowSchedule objects
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getCcShowSchedules($criteria = null, PropelPDO $con = null)
|
||||
{
|
||||
if(null === $this->collCcShowSchedules || null !== $criteria) {
|
||||
if ($this->isNew() && null === $this->collCcShowSchedules) {
|
||||
// return empty collection
|
||||
$this->initCcShowSchedules();
|
||||
} else {
|
||||
$collCcShowSchedules = CcShowScheduleQuery::create(null, $criteria)
|
||||
->filterByCcShowInstances($this)
|
||||
->find($con);
|
||||
if (null !== $criteria) {
|
||||
return $collCcShowSchedules;
|
||||
}
|
||||
$this->collCcShowSchedules = $collCcShowSchedules;
|
||||
}
|
||||
}
|
||||
return $this->collCcShowSchedules;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of related CcShowSchedule objects.
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct
|
||||
* @param PropelPDO $con
|
||||
* @return int Count of related CcShowSchedule objects.
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function countCcShowSchedules(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
|
||||
{
|
||||
if(null === $this->collCcShowSchedules || null !== $criteria) {
|
||||
if ($this->isNew() && null === $this->collCcShowSchedules) {
|
||||
return 0;
|
||||
} else {
|
||||
$query = CcShowScheduleQuery::create(null, $criteria);
|
||||
if($distinct) {
|
||||
$query->distinct();
|
||||
}
|
||||
return $query
|
||||
->filterByCcShowInstances($this)
|
||||
->count($con);
|
||||
}
|
||||
} else {
|
||||
return count($this->collCcShowSchedules);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method called to associate a CcShowSchedule object to this object
|
||||
* through the CcShowSchedule foreign key attribute.
|
||||
*
|
||||
* @param CcShowSchedule $l CcShowSchedule
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function addCcShowSchedule(CcShowSchedule $l)
|
||||
{
|
||||
if ($this->collCcShowSchedules === null) {
|
||||
$this->initCcShowSchedules();
|
||||
}
|
||||
if (!$this->collCcShowSchedules->contains($l)) { // only add it if the **same** object is not already associated
|
||||
$this->collCcShowSchedules[]= $l;
|
||||
$l->setCcShowInstances($this);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the current object and sets all attributes to their default values
|
||||
*/
|
||||
|
@ -982,8 +1128,14 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent
|
|||
public function clearAllReferences($deep = false)
|
||||
{
|
||||
if ($deep) {
|
||||
if ($this->collCcShowSchedules) {
|
||||
foreach ((array) $this->collCcShowSchedules as $o) {
|
||||
$o->clearAllReferences($deep);
|
||||
}
|
||||
}
|
||||
} // if ($deep)
|
||||
|
||||
$this->collCcShowSchedules = null;
|
||||
$this->aCcShow = null;
|
||||
}
|
||||
|
||||
|
|
|
@ -353,6 +353,9 @@ abstract class BaseCcShowInstancesPeer {
|
|||
*/
|
||||
public static function clearRelatedInstancePool()
|
||||
{
|
||||
// Invalidate objects in CcShowSchedulePeer instance pool,
|
||||
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
||||
CcShowSchedulePeer::clearInstancePool();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -24,6 +24,10 @@
|
|||
* @method CcShowInstancesQuery rightJoinCcShow($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcShow relation
|
||||
* @method CcShowInstancesQuery innerJoinCcShow($relationAlias = '') Adds a INNER JOIN clause to the query using the CcShow relation
|
||||
*
|
||||
* @method CcShowInstancesQuery leftJoinCcShowSchedule($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcShowSchedule relation
|
||||
* @method CcShowInstancesQuery rightJoinCcShowSchedule($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcShowSchedule relation
|
||||
* @method CcShowInstancesQuery innerJoinCcShowSchedule($relationAlias = '') Adds a INNER JOIN clause to the query using the CcShowSchedule relation
|
||||
*
|
||||
* @method CcShowInstances findOne(PropelPDO $con = null) Return the first CcShowInstances matching the query
|
||||
* @method CcShowInstances findOneOrCreate(PropelPDO $con = null) Return the first CcShowInstances matching the query, or a new CcShowInstances object populated from the query conditions when no match is found
|
||||
*
|
||||
|
@ -319,6 +323,70 @@ abstract class BaseCcShowInstancesQuery extends ModelCriteria
|
|||
->useQuery($relationAlias ? $relationAlias : 'CcShow', 'CcShowQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related CcShowSchedule object
|
||||
*
|
||||
* @param CcShowSchedule $ccShowSchedule the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcShowInstancesQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCcShowSchedule($ccShowSchedule, $comparison = null)
|
||||
{
|
||||
return $this
|
||||
->addUsingAlias(CcShowInstancesPeer::ID, $ccShowSchedule->getDbInstanceId(), $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the CcShowSchedule relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcShowInstancesQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinCcShowSchedule($relationAlias = '', $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('CcShowSchedule');
|
||||
|
||||
// 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, 'CcShowSchedule');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the CcShowSchedule relation CcShowSchedule 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 CcShowScheduleQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useCcShowScheduleQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCcShowSchedule($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'CcShowSchedule', 'CcShowScheduleQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude object from result
|
||||
*
|
||||
|
|
|
@ -367,9 +367,6 @@ abstract class BaseCcShowPeer {
|
|||
// Invalidate objects in CcShowHostsPeer instance pool,
|
||||
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
||||
CcShowHostsPeer::clearInstancePool();
|
||||
// Invalidate objects in CcShowSchedulePeer instance pool,
|
||||
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
||||
CcShowSchedulePeer::clearInstancePool();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -34,10 +34,6 @@
|
|||
* @method CcShowQuery rightJoinCcShowHosts($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcShowHosts relation
|
||||
* @method CcShowQuery innerJoinCcShowHosts($relationAlias = '') Adds a INNER JOIN clause to the query using the CcShowHosts relation
|
||||
*
|
||||
* @method CcShowQuery leftJoinCcShowSchedule($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcShowSchedule relation
|
||||
* @method CcShowQuery rightJoinCcShowSchedule($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcShowSchedule relation
|
||||
* @method CcShowQuery innerJoinCcShowSchedule($relationAlias = '') Adds a INNER JOIN clause to the query using the CcShowSchedule relation
|
||||
*
|
||||
* @method CcShow findOne(PropelPDO $con = null) Return the first CcShow matching the query
|
||||
* @method CcShow findOneOrCreate(PropelPDO $con = null) Return the first CcShow matching the query, or a new CcShow object populated from the query conditions when no match is found
|
||||
*
|
||||
|
@ -458,70 +454,6 @@ abstract class BaseCcShowQuery extends ModelCriteria
|
|||
->useQuery($relationAlias ? $relationAlias : 'CcShowHosts', 'CcShowHostsQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related CcShowSchedule object
|
||||
*
|
||||
* @param CcShowSchedule $ccShowSchedule the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcShowQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCcShowSchedule($ccShowSchedule, $comparison = null)
|
||||
{
|
||||
return $this
|
||||
->addUsingAlias(CcShowPeer::ID, $ccShowSchedule->getDbShowId(), $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the CcShowSchedule relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcShowQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinCcShowSchedule($relationAlias = '', $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('CcShowSchedule');
|
||||
|
||||
// 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, 'CcShowSchedule');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the CcShowSchedule relation CcShowSchedule 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 CcShowScheduleQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useCcShowScheduleQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCcShowSchedule($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'CcShowSchedule', 'CcShowScheduleQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude object from result
|
||||
*
|
||||
|
|
|
@ -31,16 +31,10 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
|
|||
protected $id;
|
||||
|
||||
/**
|
||||
* The value for the show_id field.
|
||||
* The value for the instance_id field.
|
||||
* @var int
|
||||
*/
|
||||
protected $show_id;
|
||||
|
||||
/**
|
||||
* The value for the show_day field.
|
||||
* @var string
|
||||
*/
|
||||
protected $show_day;
|
||||
protected $instance_id;
|
||||
|
||||
/**
|
||||
* The value for the position field.
|
||||
|
@ -55,9 +49,9 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
|
|||
protected $group_id;
|
||||
|
||||
/**
|
||||
* @var CcShow
|
||||
* @var CcShowInstances
|
||||
*/
|
||||
protected $aCcShow;
|
||||
protected $aCcShowInstances;
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
|
@ -84,46 +78,13 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the [show_id] column value.
|
||||
* Get the [instance_id] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getDbShowId()
|
||||
public function getDbInstanceId()
|
||||
{
|
||||
return $this->show_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [optionally formatted] temporal [show_day] column value.
|
||||
*
|
||||
*
|
||||
* @param string $format The date/time format string (either date()-style or strftime()-style).
|
||||
* If format is NULL, then the raw DateTime object will be returned.
|
||||
* @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL
|
||||
* @throws PropelException - if unable to parse/validate the date/time value.
|
||||
*/
|
||||
public function getDbShowDay($format = '%x')
|
||||
{
|
||||
if ($this->show_day === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
try {
|
||||
$dt = new DateTime($this->show_day);
|
||||
} catch (Exception $x) {
|
||||
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->show_day, true), $x);
|
||||
}
|
||||
|
||||
if ($format === null) {
|
||||
// Because propel.useDateTimeClass is TRUE, we return a DateTime object.
|
||||
return $dt;
|
||||
} elseif (strpos($format, '%') !== false) {
|
||||
return strftime($format, $dt->format('U'));
|
||||
} else {
|
||||
return $dt->format($format);
|
||||
}
|
||||
return $this->instance_id;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -167,77 +128,28 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
|
|||
} // setDbId()
|
||||
|
||||
/**
|
||||
* Set the value of [show_id] column.
|
||||
* Set the value of [instance_id] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return CcShowSchedule The current object (for fluent API support)
|
||||
*/
|
||||
public function setDbShowId($v)
|
||||
public function setDbInstanceId($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->show_id !== $v) {
|
||||
$this->show_id = $v;
|
||||
$this->modifiedColumns[] = CcShowSchedulePeer::SHOW_ID;
|
||||
if ($this->instance_id !== $v) {
|
||||
$this->instance_id = $v;
|
||||
$this->modifiedColumns[] = CcShowSchedulePeer::INSTANCE_ID;
|
||||
}
|
||||
|
||||
if ($this->aCcShow !== null && $this->aCcShow->getDbId() !== $v) {
|
||||
$this->aCcShow = null;
|
||||
if ($this->aCcShowInstances !== null && $this->aCcShowInstances->getDbId() !== $v) {
|
||||
$this->aCcShowInstances = null;
|
||||
}
|
||||
|
||||
return $this;
|
||||
} // setDbShowId()
|
||||
|
||||
/**
|
||||
* Sets the value of [show_day] column to a normalized version of the date/time value specified.
|
||||
*
|
||||
* @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
|
||||
* be treated as NULL for temporal objects.
|
||||
* @return CcShowSchedule The current object (for fluent API support)
|
||||
*/
|
||||
public function setDbShowDay($v)
|
||||
{
|
||||
// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
|
||||
// -- which is unexpected, to say the least.
|
||||
if ($v === null || $v === '') {
|
||||
$dt = null;
|
||||
} elseif ($v instanceof DateTime) {
|
||||
$dt = $v;
|
||||
} else {
|
||||
// some string/numeric value passed; we normalize that so that we can
|
||||
// validate it.
|
||||
try {
|
||||
if (is_numeric($v)) { // if it's a unix timestamp
|
||||
$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
|
||||
// We have to explicitly specify and then change the time zone because of a
|
||||
// DateTime bug: http://bugs.php.net/bug.php?id=43003
|
||||
$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
|
||||
} else {
|
||||
$dt = new DateTime($v);
|
||||
}
|
||||
} catch (Exception $x) {
|
||||
throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->show_day !== null || $dt !== null ) {
|
||||
// (nested ifs are a little easier to read in this case)
|
||||
|
||||
$currNorm = ($this->show_day !== null && $tmpDt = new DateTime($this->show_day)) ? $tmpDt->format('Y-m-d') : null;
|
||||
$newNorm = ($dt !== null) ? $dt->format('Y-m-d') : null;
|
||||
|
||||
if ( ($currNorm !== $newNorm) // normalized values don't match
|
||||
)
|
||||
{
|
||||
$this->show_day = ($dt ? $dt->format('Y-m-d') : null);
|
||||
$this->modifiedColumns[] = CcShowSchedulePeer::SHOW_DAY;
|
||||
}
|
||||
} // if either are not null
|
||||
|
||||
return $this;
|
||||
} // setDbShowDay()
|
||||
} // setDbInstanceId()
|
||||
|
||||
/**
|
||||
* Set the value of [position] column.
|
||||
|
@ -312,10 +224,9 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
|
|||
try {
|
||||
|
||||
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
|
||||
$this->show_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null;
|
||||
$this->show_day = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
|
||||
$this->position = ($row[$startcol + 3] !== null) ? (int) $row[$startcol + 3] : null;
|
||||
$this->group_id = ($row[$startcol + 4] !== null) ? (int) $row[$startcol + 4] : null;
|
||||
$this->instance_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null;
|
||||
$this->position = ($row[$startcol + 2] !== null) ? (int) $row[$startcol + 2] : null;
|
||||
$this->group_id = ($row[$startcol + 3] !== null) ? (int) $row[$startcol + 3] : null;
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
@ -324,7 +235,7 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
|
|||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 5; // 5 = CcShowSchedulePeer::NUM_COLUMNS - CcShowSchedulePeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
return $startcol + 4; // 4 = CcShowSchedulePeer::NUM_COLUMNS - CcShowSchedulePeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating CcShowSchedule object", $e);
|
||||
|
@ -347,8 +258,8 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
|
|||
public function ensureConsistency()
|
||||
{
|
||||
|
||||
if ($this->aCcShow !== null && $this->show_id !== $this->aCcShow->getDbId()) {
|
||||
$this->aCcShow = null;
|
||||
if ($this->aCcShowInstances !== null && $this->instance_id !== $this->aCcShowInstances->getDbId()) {
|
||||
$this->aCcShowInstances = null;
|
||||
}
|
||||
} // ensureConsistency
|
||||
|
||||
|
@ -389,7 +300,7 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
|
|||
|
||||
if ($deep) { // also de-associate any related objects?
|
||||
|
||||
$this->aCcShow = null;
|
||||
$this->aCcShowInstances = null;
|
||||
} // if (deep)
|
||||
}
|
||||
|
||||
|
@ -505,11 +416,11 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
|
|||
// method. This object relates to these object(s) by a
|
||||
// foreign key reference.
|
||||
|
||||
if ($this->aCcShow !== null) {
|
||||
if ($this->aCcShow->isModified() || $this->aCcShow->isNew()) {
|
||||
$affectedRows += $this->aCcShow->save($con);
|
||||
if ($this->aCcShowInstances !== null) {
|
||||
if ($this->aCcShowInstances->isModified() || $this->aCcShowInstances->isNew()) {
|
||||
$affectedRows += $this->aCcShowInstances->save($con);
|
||||
}
|
||||
$this->setCcShow($this->aCcShow);
|
||||
$this->setCcShowInstances($this->aCcShowInstances);
|
||||
}
|
||||
|
||||
if ($this->isNew() ) {
|
||||
|
@ -606,9 +517,9 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
|
|||
// method. This object relates to these object(s) by a
|
||||
// foreign key reference.
|
||||
|
||||
if ($this->aCcShow !== null) {
|
||||
if (!$this->aCcShow->validate($columns)) {
|
||||
$failureMap = array_merge($failureMap, $this->aCcShow->getValidationFailures());
|
||||
if ($this->aCcShowInstances !== null) {
|
||||
if (!$this->aCcShowInstances->validate($columns)) {
|
||||
$failureMap = array_merge($failureMap, $this->aCcShowInstances->getValidationFailures());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -655,15 +566,12 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
|
|||
return $this->getDbId();
|
||||
break;
|
||||
case 1:
|
||||
return $this->getDbShowId();
|
||||
return $this->getDbInstanceId();
|
||||
break;
|
||||
case 2:
|
||||
return $this->getDbShowDay();
|
||||
break;
|
||||
case 3:
|
||||
return $this->getDbPosition();
|
||||
break;
|
||||
case 4:
|
||||
case 3:
|
||||
return $this->getDbGroupId();
|
||||
break;
|
||||
default:
|
||||
|
@ -691,14 +599,13 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
|
|||
$keys = CcShowSchedulePeer::getFieldNames($keyType);
|
||||
$result = array(
|
||||
$keys[0] => $this->getDbId(),
|
||||
$keys[1] => $this->getDbShowId(),
|
||||
$keys[2] => $this->getDbShowDay(),
|
||||
$keys[3] => $this->getDbPosition(),
|
||||
$keys[4] => $this->getDbGroupId(),
|
||||
$keys[1] => $this->getDbInstanceId(),
|
||||
$keys[2] => $this->getDbPosition(),
|
||||
$keys[3] => $this->getDbGroupId(),
|
||||
);
|
||||
if ($includeForeignObjects) {
|
||||
if (null !== $this->aCcShow) {
|
||||
$result['CcShow'] = $this->aCcShow->toArray($keyType, $includeLazyLoadColumns, true);
|
||||
if (null !== $this->aCcShowInstances) {
|
||||
$result['CcShowInstances'] = $this->aCcShowInstances->toArray($keyType, $includeLazyLoadColumns, true);
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
|
@ -735,15 +642,12 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
|
|||
$this->setDbId($value);
|
||||
break;
|
||||
case 1:
|
||||
$this->setDbShowId($value);
|
||||
$this->setDbInstanceId($value);
|
||||
break;
|
||||
case 2:
|
||||
$this->setDbShowDay($value);
|
||||
break;
|
||||
case 3:
|
||||
$this->setDbPosition($value);
|
||||
break;
|
||||
case 4:
|
||||
case 3:
|
||||
$this->setDbGroupId($value);
|
||||
break;
|
||||
} // switch()
|
||||
|
@ -771,10 +675,9 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
|
|||
$keys = CcShowSchedulePeer::getFieldNames($keyType);
|
||||
|
||||
if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]);
|
||||
if (array_key_exists($keys[1], $arr)) $this->setDbShowId($arr[$keys[1]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setDbShowDay($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setDbPosition($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setDbGroupId($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[1], $arr)) $this->setDbInstanceId($arr[$keys[1]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setDbPosition($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setDbGroupId($arr[$keys[3]]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -787,8 +690,7 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
|
|||
$criteria = new Criteria(CcShowSchedulePeer::DATABASE_NAME);
|
||||
|
||||
if ($this->isColumnModified(CcShowSchedulePeer::ID)) $criteria->add(CcShowSchedulePeer::ID, $this->id);
|
||||
if ($this->isColumnModified(CcShowSchedulePeer::SHOW_ID)) $criteria->add(CcShowSchedulePeer::SHOW_ID, $this->show_id);
|
||||
if ($this->isColumnModified(CcShowSchedulePeer::SHOW_DAY)) $criteria->add(CcShowSchedulePeer::SHOW_DAY, $this->show_day);
|
||||
if ($this->isColumnModified(CcShowSchedulePeer::INSTANCE_ID)) $criteria->add(CcShowSchedulePeer::INSTANCE_ID, $this->instance_id);
|
||||
if ($this->isColumnModified(CcShowSchedulePeer::POSITION)) $criteria->add(CcShowSchedulePeer::POSITION, $this->position);
|
||||
if ($this->isColumnModified(CcShowSchedulePeer::GROUP_ID)) $criteria->add(CcShowSchedulePeer::GROUP_ID, $this->group_id);
|
||||
|
||||
|
@ -852,8 +754,7 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
|
|||
*/
|
||||
public function copyInto($copyObj, $deepCopy = false)
|
||||
{
|
||||
$copyObj->setDbShowId($this->show_id);
|
||||
$copyObj->setDbShowDay($this->show_day);
|
||||
$copyObj->setDbInstanceId($this->instance_id);
|
||||
$copyObj->setDbPosition($this->position);
|
||||
$copyObj->setDbGroupId($this->group_id);
|
||||
|
||||
|
@ -900,24 +801,24 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
|
|||
}
|
||||
|
||||
/**
|
||||
* Declares an association between this object and a CcShow object.
|
||||
* Declares an association between this object and a CcShowInstances object.
|
||||
*
|
||||
* @param CcShow $v
|
||||
* @param CcShowInstances $v
|
||||
* @return CcShowSchedule The current object (for fluent API support)
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function setCcShow(CcShow $v = null)
|
||||
public function setCcShowInstances(CcShowInstances $v = null)
|
||||
{
|
||||
if ($v === null) {
|
||||
$this->setDbShowId(NULL);
|
||||
$this->setDbInstanceId(NULL);
|
||||
} else {
|
||||
$this->setDbShowId($v->getDbId());
|
||||
$this->setDbInstanceId($v->getDbId());
|
||||
}
|
||||
|
||||
$this->aCcShow = $v;
|
||||
$this->aCcShowInstances = $v;
|
||||
|
||||
// Add binding for other direction of this n:n relationship.
|
||||
// If this object has already been added to the CcShow object, it will not be re-added.
|
||||
// If this object has already been added to the CcShowInstances object, it will not be re-added.
|
||||
if ($v !== null) {
|
||||
$v->addCcShowSchedule($this);
|
||||
}
|
||||
|
@ -927,25 +828,25 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
|
|||
|
||||
|
||||
/**
|
||||
* Get the associated CcShow object
|
||||
* Get the associated CcShowInstances object
|
||||
*
|
||||
* @param PropelPDO Optional Connection object.
|
||||
* @return CcShow The associated CcShow object.
|
||||
* @return CcShowInstances The associated CcShowInstances object.
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getCcShow(PropelPDO $con = null)
|
||||
public function getCcShowInstances(PropelPDO $con = null)
|
||||
{
|
||||
if ($this->aCcShow === null && ($this->show_id !== null)) {
|
||||
$this->aCcShow = CcShowQuery::create()->findPk($this->show_id, $con);
|
||||
if ($this->aCcShowInstances === null && ($this->instance_id !== null)) {
|
||||
$this->aCcShowInstances = CcShowInstancesQuery::create()->findPk($this->instance_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->aCcShow->addCcShowSchedules($this);
|
||||
$this->aCcShowInstances->addCcShowSchedules($this);
|
||||
*/
|
||||
}
|
||||
return $this->aCcShow;
|
||||
return $this->aCcShowInstances;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -954,8 +855,7 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
|
|||
public function clear()
|
||||
{
|
||||
$this->id = null;
|
||||
$this->show_id = null;
|
||||
$this->show_day = null;
|
||||
$this->instance_id = null;
|
||||
$this->position = null;
|
||||
$this->group_id = null;
|
||||
$this->alreadyInSave = false;
|
||||
|
@ -980,7 +880,7 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
|
|||
if ($deep) {
|
||||
} // if ($deep)
|
||||
|
||||
$this->aCcShow = null;
|
||||
$this->aCcShowInstances = null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -26,7 +26,7 @@ abstract class BaseCcShowSchedulePeer {
|
|||
const TM_CLASS = 'CcShowScheduleTableMap';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 5;
|
||||
const NUM_COLUMNS = 4;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
|
@ -34,11 +34,8 @@ abstract class BaseCcShowSchedulePeer {
|
|||
/** the column name for the ID field */
|
||||
const ID = 'cc_show_schedule.ID';
|
||||
|
||||
/** the column name for the SHOW_ID field */
|
||||
const SHOW_ID = 'cc_show_schedule.SHOW_ID';
|
||||
|
||||
/** the column name for the SHOW_DAY field */
|
||||
const SHOW_DAY = 'cc_show_schedule.SHOW_DAY';
|
||||
/** the column name for the INSTANCE_ID field */
|
||||
const INSTANCE_ID = 'cc_show_schedule.INSTANCE_ID';
|
||||
|
||||
/** the column name for the POSITION field */
|
||||
const POSITION = 'cc_show_schedule.POSITION';
|
||||
|
@ -62,12 +59,12 @@ abstract class BaseCcShowSchedulePeer {
|
|||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
private static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbShowId', 'DbShowDay', 'DbPosition', 'DbGroupId', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbShowId', 'dbShowDay', 'dbPosition', 'dbGroupId', ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID, self::SHOW_ID, self::SHOW_DAY, self::POSITION, self::GROUP_ID, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'SHOW_ID', 'SHOW_DAY', 'POSITION', 'GROUP_ID', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'show_id', 'show_day', 'position', 'group_id', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbInstanceId', 'DbPosition', 'DbGroupId', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbInstanceId', 'dbPosition', 'dbGroupId', ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID, self::INSTANCE_ID, self::POSITION, self::GROUP_ID, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'INSTANCE_ID', 'POSITION', 'GROUP_ID', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'instance_id', 'position', 'group_id', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -77,12 +74,12 @@ abstract class BaseCcShowSchedulePeer {
|
|||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
private static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbShowId' => 1, 'DbShowDay' => 2, 'DbPosition' => 3, 'DbGroupId' => 4, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbShowId' => 1, 'dbShowDay' => 2, 'dbPosition' => 3, 'dbGroupId' => 4, ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::SHOW_ID => 1, self::SHOW_DAY => 2, self::POSITION => 3, self::GROUP_ID => 4, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'SHOW_ID' => 1, 'SHOW_DAY' => 2, 'POSITION' => 3, 'GROUP_ID' => 4, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'show_id' => 1, 'show_day' => 2, 'position' => 3, 'group_id' => 4, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbInstanceId' => 1, 'DbPosition' => 2, 'DbGroupId' => 3, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbInstanceId' => 1, 'dbPosition' => 2, 'dbGroupId' => 3, ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::INSTANCE_ID => 1, self::POSITION => 2, self::GROUP_ID => 3, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'INSTANCE_ID' => 1, 'POSITION' => 2, 'GROUP_ID' => 3, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'instance_id' => 1, 'position' => 2, 'group_id' => 3, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -155,14 +152,12 @@ abstract class BaseCcShowSchedulePeer {
|
|||
{
|
||||
if (null === $alias) {
|
||||
$criteria->addSelectColumn(CcShowSchedulePeer::ID);
|
||||
$criteria->addSelectColumn(CcShowSchedulePeer::SHOW_ID);
|
||||
$criteria->addSelectColumn(CcShowSchedulePeer::SHOW_DAY);
|
||||
$criteria->addSelectColumn(CcShowSchedulePeer::INSTANCE_ID);
|
||||
$criteria->addSelectColumn(CcShowSchedulePeer::POSITION);
|
||||
$criteria->addSelectColumn(CcShowSchedulePeer::GROUP_ID);
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.ID');
|
||||
$criteria->addSelectColumn($alias . '.SHOW_ID');
|
||||
$criteria->addSelectColumn($alias . '.SHOW_DAY');
|
||||
$criteria->addSelectColumn($alias . '.INSTANCE_ID');
|
||||
$criteria->addSelectColumn($alias . '.POSITION');
|
||||
$criteria->addSelectColumn($alias . '.GROUP_ID');
|
||||
}
|
||||
|
@ -451,7 +446,7 @@ abstract class BaseCcShowSchedulePeer {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria, joining the related CcShow table
|
||||
* Returns the number of rows matching criteria, joining the related CcShowInstances table
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
|
||||
|
@ -459,7 +454,7 @@ abstract class BaseCcShowSchedulePeer {
|
|||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return int Number of matching rows.
|
||||
*/
|
||||
public static function doCountJoinCcShow(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
public static function doCountJoinCcShowInstances(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;
|
||||
|
@ -486,7 +481,7 @@ abstract class BaseCcShowSchedulePeer {
|
|||
$con = Propel::getConnection(CcShowSchedulePeer::DATABASE_NAME, Propel::CONNECTION_READ);
|
||||
}
|
||||
|
||||
$criteria->addJoin(CcShowSchedulePeer::SHOW_ID, CcShowPeer::ID, $join_behavior);
|
||||
$criteria->addJoin(CcShowSchedulePeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doCount($criteria, $con);
|
||||
|
||||
|
@ -501,7 +496,7 @@ abstract class BaseCcShowSchedulePeer {
|
|||
|
||||
|
||||
/**
|
||||
* Selects a collection of CcShowSchedule objects pre-filled with their CcShow objects.
|
||||
* Selects a collection of CcShowSchedule objects pre-filled with their CcShowInstances objects.
|
||||
* @param Criteria $criteria
|
||||
* @param PropelPDO $con
|
||||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
|
@ -509,7 +504,7 @@ abstract class BaseCcShowSchedulePeer {
|
|||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function doSelectJoinCcShow(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
public static function doSelectJoinCcShowInstances(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$criteria = clone $criteria;
|
||||
|
||||
|
@ -520,9 +515,9 @@ abstract class BaseCcShowSchedulePeer {
|
|||
|
||||
CcShowSchedulePeer::addSelectColumns($criteria);
|
||||
$startcol = (CcShowSchedulePeer::NUM_COLUMNS - CcShowSchedulePeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
CcShowPeer::addSelectColumns($criteria);
|
||||
CcShowInstancesPeer::addSelectColumns($criteria);
|
||||
|
||||
$criteria->addJoin(CcShowSchedulePeer::SHOW_ID, CcShowPeer::ID, $join_behavior);
|
||||
$criteria->addJoin(CcShowSchedulePeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doSelect($criteria, $con);
|
||||
$results = array();
|
||||
|
@ -542,19 +537,19 @@ abstract class BaseCcShowSchedulePeer {
|
|||
CcShowSchedulePeer::addInstanceToPool($obj1, $key1);
|
||||
} // if $obj1 already loaded
|
||||
|
||||
$key2 = CcShowPeer::getPrimaryKeyHashFromRow($row, $startcol);
|
||||
$key2 = CcShowInstancesPeer::getPrimaryKeyHashFromRow($row, $startcol);
|
||||
if ($key2 !== null) {
|
||||
$obj2 = CcShowPeer::getInstanceFromPool($key2);
|
||||
$obj2 = CcShowInstancesPeer::getInstanceFromPool($key2);
|
||||
if (!$obj2) {
|
||||
|
||||
$cls = CcShowPeer::getOMClass(false);
|
||||
$cls = CcShowInstancesPeer::getOMClass(false);
|
||||
|
||||
$obj2 = new $cls();
|
||||
$obj2->hydrate($row, $startcol);
|
||||
CcShowPeer::addInstanceToPool($obj2, $key2);
|
||||
CcShowInstancesPeer::addInstanceToPool($obj2, $key2);
|
||||
} // if obj2 already loaded
|
||||
|
||||
// Add the $obj1 (CcShowSchedule) to $obj2 (CcShow)
|
||||
// Add the $obj1 (CcShowSchedule) to $obj2 (CcShowInstances)
|
||||
$obj2->addCcShowSchedule($obj1);
|
||||
|
||||
} // if joined row was not null
|
||||
|
@ -602,7 +597,7 @@ abstract class BaseCcShowSchedulePeer {
|
|||
$con = Propel::getConnection(CcShowSchedulePeer::DATABASE_NAME, Propel::CONNECTION_READ);
|
||||
}
|
||||
|
||||
$criteria->addJoin(CcShowSchedulePeer::SHOW_ID, CcShowPeer::ID, $join_behavior);
|
||||
$criteria->addJoin(CcShowSchedulePeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doCount($criteria, $con);
|
||||
|
||||
|
@ -637,10 +632,10 @@ abstract class BaseCcShowSchedulePeer {
|
|||
CcShowSchedulePeer::addSelectColumns($criteria);
|
||||
$startcol2 = (CcShowSchedulePeer::NUM_COLUMNS - CcShowSchedulePeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
|
||||
CcShowPeer::addSelectColumns($criteria);
|
||||
$startcol3 = $startcol2 + (CcShowPeer::NUM_COLUMNS - CcShowPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
CcShowInstancesPeer::addSelectColumns($criteria);
|
||||
$startcol3 = $startcol2 + (CcShowInstancesPeer::NUM_COLUMNS - CcShowInstancesPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
|
||||
$criteria->addJoin(CcShowSchedulePeer::SHOW_ID, CcShowPeer::ID, $join_behavior);
|
||||
$criteria->addJoin(CcShowSchedulePeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doSelect($criteria, $con);
|
||||
$results = array();
|
||||
|
@ -659,21 +654,21 @@ abstract class BaseCcShowSchedulePeer {
|
|||
CcShowSchedulePeer::addInstanceToPool($obj1, $key1);
|
||||
} // if obj1 already loaded
|
||||
|
||||
// Add objects for joined CcShow rows
|
||||
// Add objects for joined CcShowInstances rows
|
||||
|
||||
$key2 = CcShowPeer::getPrimaryKeyHashFromRow($row, $startcol2);
|
||||
$key2 = CcShowInstancesPeer::getPrimaryKeyHashFromRow($row, $startcol2);
|
||||
if ($key2 !== null) {
|
||||
$obj2 = CcShowPeer::getInstanceFromPool($key2);
|
||||
$obj2 = CcShowInstancesPeer::getInstanceFromPool($key2);
|
||||
if (!$obj2) {
|
||||
|
||||
$cls = CcShowPeer::getOMClass(false);
|
||||
$cls = CcShowInstancesPeer::getOMClass(false);
|
||||
|
||||
$obj2 = new $cls();
|
||||
$obj2->hydrate($row, $startcol2);
|
||||
CcShowPeer::addInstanceToPool($obj2, $key2);
|
||||
CcShowInstancesPeer::addInstanceToPool($obj2, $key2);
|
||||
} // if obj2 loaded
|
||||
|
||||
// Add the $obj1 (CcShowSchedule) to the collection in $obj2 (CcShow)
|
||||
// Add the $obj1 (CcShowSchedule) to the collection in $obj2 (CcShowInstances)
|
||||
$obj2->addCcShowSchedule($obj1);
|
||||
} // if joined row not null
|
||||
|
||||
|
|
|
@ -7,14 +7,12 @@
|
|||
*
|
||||
*
|
||||
* @method CcShowScheduleQuery orderByDbId($order = Criteria::ASC) Order by the id column
|
||||
* @method CcShowScheduleQuery orderByDbShowId($order = Criteria::ASC) Order by the show_id column
|
||||
* @method CcShowScheduleQuery orderByDbShowDay($order = Criteria::ASC) Order by the show_day column
|
||||
* @method CcShowScheduleQuery orderByDbInstanceId($order = Criteria::ASC) Order by the instance_id column
|
||||
* @method CcShowScheduleQuery orderByDbPosition($order = Criteria::ASC) Order by the position column
|
||||
* @method CcShowScheduleQuery orderByDbGroupId($order = Criteria::ASC) Order by the group_id column
|
||||
*
|
||||
* @method CcShowScheduleQuery groupByDbId() Group by the id column
|
||||
* @method CcShowScheduleQuery groupByDbShowId() Group by the show_id column
|
||||
* @method CcShowScheduleQuery groupByDbShowDay() Group by the show_day column
|
||||
* @method CcShowScheduleQuery groupByDbInstanceId() Group by the instance_id column
|
||||
* @method CcShowScheduleQuery groupByDbPosition() Group by the position column
|
||||
* @method CcShowScheduleQuery groupByDbGroupId() Group by the group_id column
|
||||
*
|
||||
|
@ -22,22 +20,20 @@
|
|||
* @method CcShowScheduleQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
* @method CcShowScheduleQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||
*
|
||||
* @method CcShowScheduleQuery leftJoinCcShow($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcShow relation
|
||||
* @method CcShowScheduleQuery rightJoinCcShow($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcShow relation
|
||||
* @method CcShowScheduleQuery innerJoinCcShow($relationAlias = '') Adds a INNER JOIN clause to the query using the CcShow relation
|
||||
* @method CcShowScheduleQuery leftJoinCcShowInstances($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcShowInstances relation
|
||||
* @method CcShowScheduleQuery rightJoinCcShowInstances($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcShowInstances relation
|
||||
* @method CcShowScheduleQuery innerJoinCcShowInstances($relationAlias = '') Adds a INNER JOIN clause to the query using the CcShowInstances relation
|
||||
*
|
||||
* @method CcShowSchedule findOne(PropelPDO $con = null) Return the first CcShowSchedule matching the query
|
||||
* @method CcShowSchedule findOneOrCreate(PropelPDO $con = null) Return the first CcShowSchedule matching the query, or a new CcShowSchedule object populated from the query conditions when no match is found
|
||||
*
|
||||
* @method CcShowSchedule findOneByDbId(int $id) Return the first CcShowSchedule filtered by the id column
|
||||
* @method CcShowSchedule findOneByDbShowId(int $show_id) Return the first CcShowSchedule filtered by the show_id column
|
||||
* @method CcShowSchedule findOneByDbShowDay(string $show_day) Return the first CcShowSchedule filtered by the show_day column
|
||||
* @method CcShowSchedule findOneByDbInstanceId(int $instance_id) Return the first CcShowSchedule filtered by the instance_id column
|
||||
* @method CcShowSchedule findOneByDbPosition(int $position) Return the first CcShowSchedule filtered by the position column
|
||||
* @method CcShowSchedule findOneByDbGroupId(int $group_id) Return the first CcShowSchedule filtered by the group_id column
|
||||
*
|
||||
* @method array findByDbId(int $id) Return CcShowSchedule objects filtered by the id column
|
||||
* @method array findByDbShowId(int $show_id) Return CcShowSchedule objects filtered by the show_id column
|
||||
* @method array findByDbShowDay(string $show_day) Return CcShowSchedule objects filtered by the show_day column
|
||||
* @method array findByDbInstanceId(int $instance_id) Return CcShowSchedule objects filtered by the instance_id column
|
||||
* @method array findByDbPosition(int $position) Return CcShowSchedule objects filtered by the position column
|
||||
* @method array findByDbGroupId(int $group_id) Return CcShowSchedule objects filtered by the group_id column
|
||||
*
|
||||
|
@ -167,24 +163,24 @@ abstract class BaseCcShowScheduleQuery extends ModelCriteria
|
|||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the show_id column
|
||||
* Filter the query on the instance_id column
|
||||
*
|
||||
* @param int|array $dbShowId The value to use as filter.
|
||||
* @param int|array $dbInstanceId The value to use as filter.
|
||||
* Accepts an associative array('min' => $minValue, 'max' => $maxValue)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcShowScheduleQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbShowId($dbShowId = null, $comparison = null)
|
||||
public function filterByDbInstanceId($dbInstanceId = null, $comparison = null)
|
||||
{
|
||||
if (is_array($dbShowId)) {
|
||||
if (is_array($dbInstanceId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($dbShowId['min'])) {
|
||||
$this->addUsingAlias(CcShowSchedulePeer::SHOW_ID, $dbShowId['min'], Criteria::GREATER_EQUAL);
|
||||
if (isset($dbInstanceId['min'])) {
|
||||
$this->addUsingAlias(CcShowSchedulePeer::INSTANCE_ID, $dbInstanceId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($dbShowId['max'])) {
|
||||
$this->addUsingAlias(CcShowSchedulePeer::SHOW_ID, $dbShowId['max'], Criteria::LESS_EQUAL);
|
||||
if (isset($dbInstanceId['max'])) {
|
||||
$this->addUsingAlias(CcShowSchedulePeer::INSTANCE_ID, $dbInstanceId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
|
@ -194,38 +190,7 @@ abstract class BaseCcShowScheduleQuery extends ModelCriteria
|
|||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcShowSchedulePeer::SHOW_ID, $dbShowId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the show_day column
|
||||
*
|
||||
* @param string|array $dbShowDay The value to use as filter.
|
||||
* Accepts an associative array('min' => $minValue, 'max' => $maxValue)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcShowScheduleQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbShowDay($dbShowDay = null, $comparison = null)
|
||||
{
|
||||
if (is_array($dbShowDay)) {
|
||||
$useMinMax = false;
|
||||
if (isset($dbShowDay['min'])) {
|
||||
$this->addUsingAlias(CcShowSchedulePeer::SHOW_DAY, $dbShowDay['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($dbShowDay['max'])) {
|
||||
$this->addUsingAlias(CcShowSchedulePeer::SHOW_DAY, $dbShowDay['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcShowSchedulePeer::SHOW_DAY, $dbShowDay, $comparison);
|
||||
return $this->addUsingAlias(CcShowSchedulePeer::INSTANCE_ID, $dbInstanceId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -291,31 +256,31 @@ abstract class BaseCcShowScheduleQuery extends ModelCriteria
|
|||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related CcShow object
|
||||
* Filter the query by a related CcShowInstances object
|
||||
*
|
||||
* @param CcShow $ccShow the related object to use as filter
|
||||
* @param CcShowInstances $ccShowInstances the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcShowScheduleQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCcShow($ccShow, $comparison = null)
|
||||
public function filterByCcShowInstances($ccShowInstances, $comparison = null)
|
||||
{
|
||||
return $this
|
||||
->addUsingAlias(CcShowSchedulePeer::SHOW_ID, $ccShow->getDbId(), $comparison);
|
||||
->addUsingAlias(CcShowSchedulePeer::INSTANCE_ID, $ccShowInstances->getDbId(), $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the CcShow relation
|
||||
* Adds a JOIN clause to the query using the CcShowInstances relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcShowScheduleQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinCcShow($relationAlias = '', $joinType = Criteria::INNER_JOIN)
|
||||
public function joinCcShowInstances($relationAlias = '', $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('CcShow');
|
||||
$relationMap = $tableMap->getRelation('CcShowInstances');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
|
@ -330,14 +295,14 @@ abstract class BaseCcShowScheduleQuery extends ModelCriteria
|
|||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'CcShow');
|
||||
$this->addJoinObject($join, 'CcShowInstances');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the CcShow relation CcShow object
|
||||
* Use the CcShowInstances relation CcShowInstances object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
|
@ -345,13 +310,13 @@ abstract class BaseCcShowScheduleQuery extends ModelCriteria
|
|||
* to be used as main alias in the secondary query
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcShowQuery A secondary query class using the current class as primary query
|
||||
* @return CcShowInstancesQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useCcShowQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN)
|
||||
public function useCcShowInstancesQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCcShow($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'CcShow', 'CcShowQuery');
|
||||
->joinCcShowInstances($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'CcShowInstances', 'CcShowInstancesQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue