removed cc_show_schedule table.

This commit is contained in:
naomiaro 2011-02-06 22:07:17 -05:00
parent fae1401568
commit 0152514ef3
8 changed files with 19 additions and 320 deletions

View file

@ -51,7 +51,6 @@ 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);
$this->addRelation('CcSchedule', 'CcSchedule', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null);
} // buildRelations()

View file

@ -53,11 +53,6 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent
*/
protected $aCcShow;
/**
* @var array CcShowSchedule[] Collection to store aggregation of CcShowSchedule objects.
*/
protected $collCcShowSchedules;
/**
* @var array CcSchedule[] Collection to store aggregation of CcSchedule objects.
*/
@ -415,8 +410,6 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent
if ($deep) { // also de-associate any related objects?
$this->aCcShow = null;
$this->collCcShowSchedules = null;
$this->collCcSchedules = null;
} // if (deep)
@ -564,14 +557,6 @@ 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);
}
}
}
if ($this->collCcSchedules !== null) {
foreach ($this->collCcSchedules as $referrerFK) {
if (!$referrerFK->isDeleted()) {
@ -663,14 +648,6 @@ 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());
}
}
}
if ($this->collCcSchedules !== null) {
foreach ($this->collCcSchedules as $referrerFK) {
if (!$referrerFK->validate($columns)) {
@ -913,12 +890,6 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent
// 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));
}
}
foreach ($this->getCcSchedules() as $relObj) {
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
$copyObj->addCcSchedule($relObj->copy($deepCopy));
@ -1019,115 +990,6 @@ 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 out the collCcSchedules collection
*
@ -1266,11 +1128,6 @@ 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 ($this->collCcSchedules) {
foreach ((array) $this->collCcSchedules as $o) {
$o->clearAllReferences($deep);
@ -1278,7 +1135,6 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent
}
} // if ($deep)
$this->collCcShowSchedules = null;
$this->collCcSchedules = null;
$this->aCcShow = null;
}

View file

@ -353,9 +353,6 @@ 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();
// Invalidate objects in CcSchedulePeer instance pool,
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
CcSchedulePeer::clearInstancePool();

View file

@ -24,10 +24,6 @@
* @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 CcShowInstancesQuery leftJoinCcSchedule($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcSchedule relation
* @method CcShowInstancesQuery rightJoinCcSchedule($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcSchedule relation
* @method CcShowInstancesQuery innerJoinCcSchedule($relationAlias = '') Adds a INNER JOIN clause to the query using the CcSchedule relation
@ -327,70 +323,6 @@ 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');
}
/**
* Filter the query by a related CcSchedule object
*