CC-2991: Repeating a show is broken

This commit is contained in:
Martin Konecny 2011-10-24 13:46:16 -04:00
parent ca757d0fc0
commit 858990eb8c
8 changed files with 376 additions and 260 deletions

View file

@ -42,6 +42,7 @@ class CcShowDaysTableMap extends TableMap {
$this->addColumn('FIRST_SHOW', 'DbFirstShow', 'DATE', true, null, null);
$this->addColumn('LAST_SHOW', 'DbLastShow', 'DATE', false, null, null);
$this->addColumn('START_TIME', 'DbStartTime', 'TIME', true, null, null);
$this->addColumn('TIMEZONE', 'DbTimezone', 'VARCHAR', true, 255, null);
$this->addColumn('DURATION', 'DbDuration', 'VARCHAR', true, 255, null);
$this->addColumn('DAY', 'DbDay', 'TINYINT', false, null, null);
$this->addColumn('REPEAT_TYPE', 'DbRepeatType', 'TINYINT', true, null, null);

View file

@ -48,6 +48,12 @@ abstract class BaseCcShowDays extends BaseObject implements Persistent
*/
protected $start_time;
/**
* The value for the timezone field.
* @var string
*/
protected $timezone;
/**
* The value for the duration field.
* @var string
@ -234,6 +240,16 @@ abstract class BaseCcShowDays extends BaseObject implements Persistent
}
}
/**
* Get the [timezone] column value.
*
* @return string
*/
public function getDbTimezone()
{
return $this->timezone;
}
/**
* Get the [duration] column value.
*
@ -484,6 +500,26 @@ abstract class BaseCcShowDays extends BaseObject implements Persistent
return $this;
} // setDbStartTime()
/**
* Set the value of [timezone] column.
*
* @param string $v new value
* @return CcShowDays The current object (for fluent API support)
*/
public function setDbTimezone($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->timezone !== $v) {
$this->timezone = $v;
$this->modifiedColumns[] = CcShowDaysPeer::TIMEZONE;
}
return $this;
} // setDbTimezone()
/**
* Set the value of [duration] column.
*
@ -677,12 +713,13 @@ abstract class BaseCcShowDays extends BaseObject implements Persistent
$this->first_show = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
$this->last_show = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
$this->start_time = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
$this->duration = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
$this->day = ($row[$startcol + 5] !== null) ? (int) $row[$startcol + 5] : null;
$this->repeat_type = ($row[$startcol + 6] !== null) ? (int) $row[$startcol + 6] : null;
$this->next_pop_date = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
$this->show_id = ($row[$startcol + 8] !== null) ? (int) $row[$startcol + 8] : null;
$this->record = ($row[$startcol + 9] !== null) ? (int) $row[$startcol + 9] : null;
$this->timezone = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
$this->duration = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
$this->day = ($row[$startcol + 6] !== null) ? (int) $row[$startcol + 6] : null;
$this->repeat_type = ($row[$startcol + 7] !== null) ? (int) $row[$startcol + 7] : null;
$this->next_pop_date = ($row[$startcol + 8] !== null) ? (string) $row[$startcol + 8] : null;
$this->show_id = ($row[$startcol + 9] !== null) ? (int) $row[$startcol + 9] : null;
$this->record = ($row[$startcol + 10] !== null) ? (int) $row[$startcol + 10] : null;
$this->resetModified();
$this->setNew(false);
@ -691,7 +728,7 @@ abstract class BaseCcShowDays extends BaseObject implements Persistent
$this->ensureConsistency();
}
return $startcol + 10; // 10 = CcShowDaysPeer::NUM_COLUMNS - CcShowDaysPeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 11; // 11 = CcShowDaysPeer::NUM_COLUMNS - CcShowDaysPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating CcShowDays object", $e);
@ -1031,21 +1068,24 @@ abstract class BaseCcShowDays extends BaseObject implements Persistent
return $this->getDbStartTime();
break;
case 4:
return $this->getDbDuration();
return $this->getDbTimezone();
break;
case 5:
return $this->getDbDay();
return $this->getDbDuration();
break;
case 6:
return $this->getDbRepeatType();
return $this->getDbDay();
break;
case 7:
return $this->getDbNextPopDate();
return $this->getDbRepeatType();
break;
case 8:
return $this->getDbShowId();
return $this->getDbNextPopDate();
break;
case 9:
return $this->getDbShowId();
break;
case 10:
return $this->getDbRecord();
break;
default:
@ -1076,12 +1116,13 @@ abstract class BaseCcShowDays extends BaseObject implements Persistent
$keys[1] => $this->getDbFirstShow(),
$keys[2] => $this->getDbLastShow(),
$keys[3] => $this->getDbStartTime(),
$keys[4] => $this->getDbDuration(),
$keys[5] => $this->getDbDay(),
$keys[6] => $this->getDbRepeatType(),
$keys[7] => $this->getDbNextPopDate(),
$keys[8] => $this->getDbShowId(),
$keys[9] => $this->getDbRecord(),
$keys[4] => $this->getDbTimezone(),
$keys[5] => $this->getDbDuration(),
$keys[6] => $this->getDbDay(),
$keys[7] => $this->getDbRepeatType(),
$keys[8] => $this->getDbNextPopDate(),
$keys[9] => $this->getDbShowId(),
$keys[10] => $this->getDbRecord(),
);
if ($includeForeignObjects) {
if (null !== $this->aCcShow) {
@ -1131,21 +1172,24 @@ abstract class BaseCcShowDays extends BaseObject implements Persistent
$this->setDbStartTime($value);
break;
case 4:
$this->setDbDuration($value);
$this->setDbTimezone($value);
break;
case 5:
$this->setDbDay($value);
$this->setDbDuration($value);
break;
case 6:
$this->setDbRepeatType($value);
$this->setDbDay($value);
break;
case 7:
$this->setDbNextPopDate($value);
$this->setDbRepeatType($value);
break;
case 8:
$this->setDbShowId($value);
$this->setDbNextPopDate($value);
break;
case 9:
$this->setDbShowId($value);
break;
case 10:
$this->setDbRecord($value);
break;
} // switch()
@ -1176,12 +1220,13 @@ abstract class BaseCcShowDays extends BaseObject implements Persistent
if (array_key_exists($keys[1], $arr)) $this->setDbFirstShow($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setDbLastShow($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setDbStartTime($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setDbDuration($arr[$keys[4]]);
if (array_key_exists($keys[5], $arr)) $this->setDbDay($arr[$keys[5]]);
if (array_key_exists($keys[6], $arr)) $this->setDbRepeatType($arr[$keys[6]]);
if (array_key_exists($keys[7], $arr)) $this->setDbNextPopDate($arr[$keys[7]]);
if (array_key_exists($keys[8], $arr)) $this->setDbShowId($arr[$keys[8]]);
if (array_key_exists($keys[9], $arr)) $this->setDbRecord($arr[$keys[9]]);
if (array_key_exists($keys[4], $arr)) $this->setDbTimezone($arr[$keys[4]]);
if (array_key_exists($keys[5], $arr)) $this->setDbDuration($arr[$keys[5]]);
if (array_key_exists($keys[6], $arr)) $this->setDbDay($arr[$keys[6]]);
if (array_key_exists($keys[7], $arr)) $this->setDbRepeatType($arr[$keys[7]]);
if (array_key_exists($keys[8], $arr)) $this->setDbNextPopDate($arr[$keys[8]]);
if (array_key_exists($keys[9], $arr)) $this->setDbShowId($arr[$keys[9]]);
if (array_key_exists($keys[10], $arr)) $this->setDbRecord($arr[$keys[10]]);
}
/**
@ -1197,6 +1242,7 @@ abstract class BaseCcShowDays extends BaseObject implements Persistent
if ($this->isColumnModified(CcShowDaysPeer::FIRST_SHOW)) $criteria->add(CcShowDaysPeer::FIRST_SHOW, $this->first_show);
if ($this->isColumnModified(CcShowDaysPeer::LAST_SHOW)) $criteria->add(CcShowDaysPeer::LAST_SHOW, $this->last_show);
if ($this->isColumnModified(CcShowDaysPeer::START_TIME)) $criteria->add(CcShowDaysPeer::START_TIME, $this->start_time);
if ($this->isColumnModified(CcShowDaysPeer::TIMEZONE)) $criteria->add(CcShowDaysPeer::TIMEZONE, $this->timezone);
if ($this->isColumnModified(CcShowDaysPeer::DURATION)) $criteria->add(CcShowDaysPeer::DURATION, $this->duration);
if ($this->isColumnModified(CcShowDaysPeer::DAY)) $criteria->add(CcShowDaysPeer::DAY, $this->day);
if ($this->isColumnModified(CcShowDaysPeer::REPEAT_TYPE)) $criteria->add(CcShowDaysPeer::REPEAT_TYPE, $this->repeat_type);
@ -1267,6 +1313,7 @@ abstract class BaseCcShowDays extends BaseObject implements Persistent
$copyObj->setDbFirstShow($this->first_show);
$copyObj->setDbLastShow($this->last_show);
$copyObj->setDbStartTime($this->start_time);
$copyObj->setDbTimezone($this->timezone);
$copyObj->setDbDuration($this->duration);
$copyObj->setDbDay($this->day);
$copyObj->setDbRepeatType($this->repeat_type);
@ -1374,6 +1421,7 @@ abstract class BaseCcShowDays extends BaseObject implements Persistent
$this->first_show = null;
$this->last_show = null;
$this->start_time = null;
$this->timezone = null;
$this->duration = null;
$this->day = null;
$this->repeat_type = null;

View file

@ -26,7 +26,7 @@ abstract class BaseCcShowDaysPeer {
const TM_CLASS = 'CcShowDaysTableMap';
/** The total number of columns. */
const NUM_COLUMNS = 10;
const NUM_COLUMNS = 11;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@ -43,6 +43,9 @@ abstract class BaseCcShowDaysPeer {
/** the column name for the START_TIME field */
const START_TIME = 'cc_show_days.START_TIME';
/** the column name for the TIMEZONE field */
const TIMEZONE = 'cc_show_days.TIMEZONE';
/** the column name for the DURATION field */
const DURATION = 'cc_show_days.DURATION';
@ -77,12 +80,12 @@ abstract class BaseCcShowDaysPeer {
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbFirstShow', 'DbLastShow', 'DbStartTime', 'DbDuration', 'DbDay', 'DbRepeatType', 'DbNextPopDate', 'DbShowId', 'DbRecord', ),
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbFirstShow', 'dbLastShow', 'dbStartTime', 'dbDuration', 'dbDay', 'dbRepeatType', 'dbNextPopDate', 'dbShowId', 'dbRecord', ),
BasePeer::TYPE_COLNAME => array (self::ID, self::FIRST_SHOW, self::LAST_SHOW, self::START_TIME, self::DURATION, self::DAY, self::REPEAT_TYPE, self::NEXT_POP_DATE, self::SHOW_ID, self::RECORD, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'FIRST_SHOW', 'LAST_SHOW', 'START_TIME', 'DURATION', 'DAY', 'REPEAT_TYPE', 'NEXT_POP_DATE', 'SHOW_ID', 'RECORD', ),
BasePeer::TYPE_FIELDNAME => array ('id', 'first_show', 'last_show', 'start_time', 'duration', 'day', 'repeat_type', 'next_pop_date', 'show_id', 'record', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, )
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbFirstShow', 'DbLastShow', 'DbStartTime', 'DbTimezone', 'DbDuration', 'DbDay', 'DbRepeatType', 'DbNextPopDate', 'DbShowId', 'DbRecord', ),
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbFirstShow', 'dbLastShow', 'dbStartTime', 'dbTimezone', 'dbDuration', 'dbDay', 'dbRepeatType', 'dbNextPopDate', 'dbShowId', 'dbRecord', ),
BasePeer::TYPE_COLNAME => array (self::ID, self::FIRST_SHOW, self::LAST_SHOW, self::START_TIME, self::TIMEZONE, self::DURATION, self::DAY, self::REPEAT_TYPE, self::NEXT_POP_DATE, self::SHOW_ID, self::RECORD, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'FIRST_SHOW', 'LAST_SHOW', 'START_TIME', 'TIMEZONE', 'DURATION', 'DAY', 'REPEAT_TYPE', 'NEXT_POP_DATE', 'SHOW_ID', 'RECORD', ),
BasePeer::TYPE_FIELDNAME => array ('id', 'first_show', 'last_show', 'start_time', 'timezone', 'duration', 'day', 'repeat_type', 'next_pop_date', 'show_id', 'record', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, )
);
/**
@ -92,12 +95,12 @@ abstract class BaseCcShowDaysPeer {
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbFirstShow' => 1, 'DbLastShow' => 2, 'DbStartTime' => 3, 'DbDuration' => 4, 'DbDay' => 5, 'DbRepeatType' => 6, 'DbNextPopDate' => 7, 'DbShowId' => 8, 'DbRecord' => 9, ),
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbFirstShow' => 1, 'dbLastShow' => 2, 'dbStartTime' => 3, 'dbDuration' => 4, 'dbDay' => 5, 'dbRepeatType' => 6, 'dbNextPopDate' => 7, 'dbShowId' => 8, 'dbRecord' => 9, ),
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::FIRST_SHOW => 1, self::LAST_SHOW => 2, self::START_TIME => 3, self::DURATION => 4, self::DAY => 5, self::REPEAT_TYPE => 6, self::NEXT_POP_DATE => 7, self::SHOW_ID => 8, self::RECORD => 9, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'FIRST_SHOW' => 1, 'LAST_SHOW' => 2, 'START_TIME' => 3, 'DURATION' => 4, 'DAY' => 5, 'REPEAT_TYPE' => 6, 'NEXT_POP_DATE' => 7, 'SHOW_ID' => 8, 'RECORD' => 9, ),
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'first_show' => 1, 'last_show' => 2, 'start_time' => 3, 'duration' => 4, 'day' => 5, 'repeat_type' => 6, 'next_pop_date' => 7, 'show_id' => 8, 'record' => 9, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, )
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbFirstShow' => 1, 'DbLastShow' => 2, 'DbStartTime' => 3, 'DbTimezone' => 4, 'DbDuration' => 5, 'DbDay' => 6, 'DbRepeatType' => 7, 'DbNextPopDate' => 8, 'DbShowId' => 9, 'DbRecord' => 10, ),
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbFirstShow' => 1, 'dbLastShow' => 2, 'dbStartTime' => 3, 'dbTimezone' => 4, 'dbDuration' => 5, 'dbDay' => 6, 'dbRepeatType' => 7, 'dbNextPopDate' => 8, 'dbShowId' => 9, 'dbRecord' => 10, ),
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::FIRST_SHOW => 1, self::LAST_SHOW => 2, self::START_TIME => 3, self::TIMEZONE => 4, self::DURATION => 5, self::DAY => 6, self::REPEAT_TYPE => 7, self::NEXT_POP_DATE => 8, self::SHOW_ID => 9, self::RECORD => 10, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'FIRST_SHOW' => 1, 'LAST_SHOW' => 2, 'START_TIME' => 3, 'TIMEZONE' => 4, 'DURATION' => 5, 'DAY' => 6, 'REPEAT_TYPE' => 7, 'NEXT_POP_DATE' => 8, 'SHOW_ID' => 9, 'RECORD' => 10, ),
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'first_show' => 1, 'last_show' => 2, 'start_time' => 3, 'timezone' => 4, 'duration' => 5, 'day' => 6, 'repeat_type' => 7, 'next_pop_date' => 8, 'show_id' => 9, 'record' => 10, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, )
);
/**
@ -173,6 +176,7 @@ abstract class BaseCcShowDaysPeer {
$criteria->addSelectColumn(CcShowDaysPeer::FIRST_SHOW);
$criteria->addSelectColumn(CcShowDaysPeer::LAST_SHOW);
$criteria->addSelectColumn(CcShowDaysPeer::START_TIME);
$criteria->addSelectColumn(CcShowDaysPeer::TIMEZONE);
$criteria->addSelectColumn(CcShowDaysPeer::DURATION);
$criteria->addSelectColumn(CcShowDaysPeer::DAY);
$criteria->addSelectColumn(CcShowDaysPeer::REPEAT_TYPE);
@ -184,6 +188,7 @@ abstract class BaseCcShowDaysPeer {
$criteria->addSelectColumn($alias . '.FIRST_SHOW');
$criteria->addSelectColumn($alias . '.LAST_SHOW');
$criteria->addSelectColumn($alias . '.START_TIME');
$criteria->addSelectColumn($alias . '.TIMEZONE');
$criteria->addSelectColumn($alias . '.DURATION');
$criteria->addSelectColumn($alias . '.DAY');
$criteria->addSelectColumn($alias . '.REPEAT_TYPE');

View file

@ -10,6 +10,7 @@
* @method CcShowDaysQuery orderByDbFirstShow($order = Criteria::ASC) Order by the first_show column
* @method CcShowDaysQuery orderByDbLastShow($order = Criteria::ASC) Order by the last_show column
* @method CcShowDaysQuery orderByDbStartTime($order = Criteria::ASC) Order by the start_time column
* @method CcShowDaysQuery orderByDbTimezone($order = Criteria::ASC) Order by the timezone column
* @method CcShowDaysQuery orderByDbDuration($order = Criteria::ASC) Order by the duration column
* @method CcShowDaysQuery orderByDbDay($order = Criteria::ASC) Order by the day column
* @method CcShowDaysQuery orderByDbRepeatType($order = Criteria::ASC) Order by the repeat_type column
@ -21,6 +22,7 @@
* @method CcShowDaysQuery groupByDbFirstShow() Group by the first_show column
* @method CcShowDaysQuery groupByDbLastShow() Group by the last_show column
* @method CcShowDaysQuery groupByDbStartTime() Group by the start_time column
* @method CcShowDaysQuery groupByDbTimezone() Group by the timezone column
* @method CcShowDaysQuery groupByDbDuration() Group by the duration column
* @method CcShowDaysQuery groupByDbDay() Group by the day column
* @method CcShowDaysQuery groupByDbRepeatType() Group by the repeat_type column
@ -43,6 +45,7 @@
* @method CcShowDays findOneByDbFirstShow(string $first_show) Return the first CcShowDays filtered by the first_show column
* @method CcShowDays findOneByDbLastShow(string $last_show) Return the first CcShowDays filtered by the last_show column
* @method CcShowDays findOneByDbStartTime(string $start_time) Return the first CcShowDays filtered by the start_time column
* @method CcShowDays findOneByDbTimezone(string $timezone) Return the first CcShowDays filtered by the timezone column
* @method CcShowDays findOneByDbDuration(string $duration) Return the first CcShowDays filtered by the duration column
* @method CcShowDays findOneByDbDay(int $day) Return the first CcShowDays filtered by the day column
* @method CcShowDays findOneByDbRepeatType(int $repeat_type) Return the first CcShowDays filtered by the repeat_type column
@ -54,6 +57,7 @@
* @method array findByDbFirstShow(string $first_show) Return CcShowDays objects filtered by the first_show column
* @method array findByDbLastShow(string $last_show) Return CcShowDays objects filtered by the last_show column
* @method array findByDbStartTime(string $start_time) Return CcShowDays objects filtered by the start_time column
* @method array findByDbTimezone(string $timezone) Return CcShowDays objects filtered by the timezone column
* @method array findByDbDuration(string $duration) Return CcShowDays objects filtered by the duration column
* @method array findByDbDay(int $day) Return CcShowDays objects filtered by the day column
* @method array findByDbRepeatType(int $repeat_type) Return CcShowDays objects filtered by the repeat_type column
@ -279,6 +283,28 @@ abstract class BaseCcShowDaysQuery extends ModelCriteria
return $this->addUsingAlias(CcShowDaysPeer::START_TIME, $dbStartTime, $comparison);
}
/**
* Filter the query on the timezone column
*
* @param string $dbTimezone The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcShowDaysQuery The current query, for fluid interface
*/
public function filterByDbTimezone($dbTimezone = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbTimezone)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbTimezone)) {
$dbTimezone = str_replace('*', '%', $dbTimezone);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcShowDaysPeer::TIMEZONE, $dbTimezone, $comparison);
}
/**
* Filter the query on the duration column
*