changed back to old schedule id to test if playback works now.

This commit is contained in:
naomiaro 2011-02-06 15:31:36 -05:00
parent ebb43857f6
commit 75eea94641
7 changed files with 21 additions and 34 deletions

View file

@ -35,10 +35,9 @@ class CcScheduleTableMap extends TableMap {
$this->setPhpName('CcSchedule');
$this->setClassname('CcSchedule');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_schedule_id_seq');
$this->setUseIdGenerator(false);
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addPrimaryKey('ID', 'DbId', 'BIGINT', true, null, null);
$this->addColumn('PLAYLIST_ID', 'DbPlaylistId', 'INTEGER', true, null, null);
$this->addColumn('STARTS', 'DbStarts', 'TIMESTAMP', true, null, null);
$this->addColumn('ENDS', 'DbEnds', 'TIMESTAMP', true, null, null);

View file

@ -26,7 +26,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
/**
* The value for the id field.
* @var int
* @var string
*/
protected $id;
@ -164,7 +164,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
/**
* Get the [id] column value.
*
* @return int
* @return string
*/
public function getDbId()
{
@ -465,13 +465,13 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
/**
* Set the value of [id] column.
*
* @param int $v new value
* @param string $v new value
* @return CcSchedule The current object (for fluent API support)
*/
public function setDbId($v)
{
if ($v !== null) {
$v = (int) $v;
$v = (string) $v;
}
if ($this->id !== $v) {
@ -1014,7 +1014,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
{
try {
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
$this->id = ($row[$startcol + 0] !== null) ? (string) $row[$startcol + 0] : null;
$this->playlist_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null;
$this->starts = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
$this->ends = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
@ -1224,21 +1224,13 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
$this->setCcShowInstances($this->aCcShowInstances);
}
if ($this->isNew() ) {
$this->modifiedColumns[] = CcSchedulePeer::ID;
}
// If this object has been modified, then save it to the database.
if ($this->isModified()) {
if ($this->isNew()) {
$criteria = $this->buildCriteria();
if ($criteria->keyContainsValue(CcSchedulePeer::ID) ) {
throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcSchedulePeer::ID.')');
}
$pk = BasePeer::doInsert($criteria, $con);
$affectedRows += 1;
$this->setDbId($pk); //[IMV] update autoincrement primary key
$this->setNew(false);
} else {
$affectedRows += CcSchedulePeer::doUpdate($this, $con);
@ -1606,7 +1598,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
/**
* Returns the primary key for this object (row).
* @return int
* @return string
*/
public function getPrimaryKey()
{
@ -1616,7 +1608,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
/**
* Generic method to set the primary key (id column).
*
* @param int $key Primary key.
* @param string $key Primary key.
* @return void
*/
public function setPrimaryKey($key)
@ -1645,6 +1637,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
*/
public function copyInto($copyObj, $deepCopy = false)
{
$copyObj->setDbId($this->id);
$copyObj->setDbPlaylistId($this->playlist_id);
$copyObj->setDbStarts($this->starts);
$copyObj->setDbEnds($this->ends);
@ -1660,7 +1653,6 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
$copyObj->setDbInstanceId($this->instance_id);
$copyObj->setNew(true);
$copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value
}
/**

View file

@ -435,7 +435,7 @@ abstract class BaseCcSchedulePeer {
*/
public static function getPrimaryKeyFromRow($row, $startcol = 0)
{
return (int) $row[$startcol];
return (string) $row[$startcol];
}
/**
@ -789,10 +789,6 @@ abstract class BaseCcSchedulePeer {
$criteria = $values->buildCriteria(); // build Criteria from CcSchedule object
}
if ($criteria->containsKey(CcSchedulePeer::ID) && $criteria->keyContainsValue(CcSchedulePeer::ID) ) {
throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcSchedulePeer::ID.')');
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
@ -977,7 +973,7 @@ abstract class BaseCcSchedulePeer {
/**
* Retrieve a single object by pkey.
*
* @param int $pk the primary key.
* @param string $pk the primary key.
* @param PropelPDO $con the connection to use
* @return CcSchedule
*/

View file

@ -47,7 +47,7 @@
* @method CcSchedule findOne(PropelPDO $con = null) Return the first CcSchedule matching the query
* @method CcSchedule findOneOrCreate(PropelPDO $con = null) Return the first CcSchedule matching the query, or a new CcSchedule object populated from the query conditions when no match is found
*
* @method CcSchedule findOneByDbId(int $id) Return the first CcSchedule filtered by the id column
* @method CcSchedule findOneByDbId(string $id) Return the first CcSchedule filtered by the id column
* @method CcSchedule findOneByDbPlaylistId(int $playlist_id) Return the first CcSchedule filtered by the playlist_id column
* @method CcSchedule findOneByDbStarts(string $starts) Return the first CcSchedule filtered by the starts column
* @method CcSchedule findOneByDbEnds(string $ends) Return the first CcSchedule filtered by the ends column
@ -62,7 +62,7 @@
* @method CcSchedule findOneByDbMediaItemPlayed(boolean $media_item_played) Return the first CcSchedule filtered by the media_item_played column
* @method CcSchedule findOneByDbInstanceId(int $instance_id) Return the first CcSchedule filtered by the instance_id column
*
* @method array findByDbId(int $id) Return CcSchedule objects filtered by the id column
* @method array findByDbId(string $id) Return CcSchedule objects filtered by the id column
* @method array findByDbPlaylistId(int $playlist_id) Return CcSchedule objects filtered by the playlist_id column
* @method array findByDbStarts(string $starts) Return CcSchedule objects filtered by the starts column
* @method array findByDbEnds(string $ends) Return CcSchedule objects filtered by the ends column
@ -188,7 +188,7 @@ abstract class BaseCcScheduleQuery extends ModelCriteria
/**
* Filter the query on the id column
*
* @param int|array $dbId The value to use as filter.
* @param string|array $dbId 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
*