PL ORM changes, templates

This commit is contained in:
naomiaro 2010-11-09 16:52:09 -05:00
parent 2570698ba7
commit fcea57f011
11 changed files with 163 additions and 425 deletions

View file

@ -29,4 +29,20 @@ class CcPlaylist extends BaseCcPlaylist {
$stmt->execute();
return $stmt->fetchColumn();
}
public function computeLength()
{
$con = Propel::getConnection(CcPlaylistPeer::DATABASE_NAME);
$sql = 'SELECT SUM('.CcPlaylistcontentsPeer::CLIPLENGTH.') AS length'
. ' FROM ' .CcPlaylistcontentsPeer::TABLE_NAME
. ' WHERE ' .CcPlaylistcontentsPeer::PLAYLIST_ID. ' = :p1';
$stmt = $con->prepare($sql);
$stmt->bindValue(':p1', $this->getDbId());
$stmt->execute();
return $stmt->fetchColumn();
}
} // CcPlaylist

View file

@ -53,7 +53,7 @@ class CcFilesTableMap extends TableMap {
$this->addColumn('BIT_RATE', 'BitRate', 'VARCHAR', false, 32, null);
$this->addColumn('SAMPLE_RATE', 'SampleRate', 'VARCHAR', false, 32, null);
$this->addColumn('FORMAT', 'Format', 'VARCHAR', false, 128, null);
$this->addColumn('LENGTH', 'Length', 'TIME', false, null, null);
$this->addColumn('LENGTH', 'DbLength', 'TIME', false, null, null);
$this->addColumn('ALBUM_TITLE', 'AlbumTitle', 'VARCHAR', false, 512, null);
$this->addColumn('GENRE', 'Genre', 'VARCHAR', false, 64, null);
$this->addColumn('COMMENTS', 'Comments', 'LONGVARCHAR', false, null, null);

View file

@ -578,7 +578,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
* @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 getLength($format = '%X')
public function getDbLength($format = '%X')
{
if ($this->length === null) {
return null;
@ -1312,7 +1312,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
* be treated as NULL for temporal objects.
* @return CcFiles The current object (for fluent API support)
*/
public function setLength($v)
public function setDbLength($v)
{
// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
// -- which is unexpected, to say the least.
@ -1352,7 +1352,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
} // if either are not null
return $this;
} // setLength()
} // setDbLength()
/**
* Set the value of [album_title] column.
@ -2598,7 +2598,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this->getFormat();
break;
case 15:
return $this->getLength();
return $this->getDbLength();
break;
case 16:
return $this->getAlbumTitle();
@ -2750,7 +2750,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$keys[12] => $this->getBitRate(),
$keys[13] => $this->getSampleRate(),
$keys[14] => $this->getFormat(),
$keys[15] => $this->getLength(),
$keys[15] => $this->getDbLength(),
$keys[16] => $this->getAlbumTitle(),
$keys[17] => $this->getGenre(),
$keys[18] => $this->getComments(),
@ -2870,7 +2870,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->setFormat($value);
break;
case 15:
$this->setLength($value);
$this->setDbLength($value);
break;
case 16:
$this->setAlbumTitle($value);
@ -3022,7 +3022,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
if (array_key_exists($keys[12], $arr)) $this->setBitRate($arr[$keys[12]]);
if (array_key_exists($keys[13], $arr)) $this->setSampleRate($arr[$keys[13]]);
if (array_key_exists($keys[14], $arr)) $this->setFormat($arr[$keys[14]]);
if (array_key_exists($keys[15], $arr)) $this->setLength($arr[$keys[15]]);
if (array_key_exists($keys[15], $arr)) $this->setDbLength($arr[$keys[15]]);
if (array_key_exists($keys[16], $arr)) $this->setAlbumTitle($arr[$keys[16]]);
if (array_key_exists($keys[17], $arr)) $this->setGenre($arr[$keys[17]]);
if (array_key_exists($keys[18], $arr)) $this->setComments($arr[$keys[18]]);
@ -3199,7 +3199,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$copyObj->setBitRate($this->bit_rate);
$copyObj->setSampleRate($this->sample_rate);
$copyObj->setFormat($this->format);
$copyObj->setLength($this->length);
$copyObj->setDbLength($this->length);
$copyObj->setAlbumTitle($this->album_title);
$copyObj->setGenre($this->genre);
$copyObj->setComments($this->comments);

View file

@ -206,8 +206,8 @@ abstract class BaseCcFilesPeer {
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('Id', 'Gunid', 'Name', 'Mime', 'Ftype', 'State', 'Currentlyaccessing', 'Editedby', 'Mtime', 'Md5', 'TrackTitle', 'ArtistName', 'BitRate', 'SampleRate', 'Format', 'Length', 'AlbumTitle', 'Genre', 'Comments', 'Year', 'TrackNumber', 'Channels', 'Url', 'Bpm', 'Rating', 'EncodedBy', 'DiscNumber', 'Mood', 'Label', 'Composer', 'Encoder', 'Checksum', 'Lyrics', 'Orchestra', 'Conductor', 'Lyricist', 'OriginalLyricist', 'RadioStationName', 'InfoUrl', 'ArtistUrl', 'AudioSourceUrl', 'RadioStationUrl', 'BuyThisUrl', 'IsrcNumber', 'CatalogNumber', 'OriginalArtist', 'Copyright', 'ReportDatetime', 'ReportLocation', 'ReportOrganization', 'Subject', 'Contributor', 'Language', ),
BasePeer::TYPE_STUDLYPHPNAME => array ('id', 'gunid', 'name', 'mime', 'ftype', 'state', 'currentlyaccessing', 'editedby', 'mtime', 'md5', 'trackTitle', 'artistName', 'bitRate', 'sampleRate', 'format', 'length', 'albumTitle', 'genre', 'comments', 'year', 'trackNumber', 'channels', 'url', 'bpm', 'rating', 'encodedBy', 'discNumber', 'mood', 'label', 'composer', 'encoder', 'checksum', 'lyrics', 'orchestra', 'conductor', 'lyricist', 'originalLyricist', 'radioStationName', 'infoUrl', 'artistUrl', 'audioSourceUrl', 'radioStationUrl', 'buyThisUrl', 'isrcNumber', 'catalogNumber', 'originalArtist', 'copyright', 'reportDatetime', 'reportLocation', 'reportOrganization', 'subject', 'contributor', 'language', ),
BasePeer::TYPE_PHPNAME => array ('Id', 'Gunid', 'Name', 'Mime', 'Ftype', 'State', 'Currentlyaccessing', 'Editedby', 'Mtime', 'Md5', 'TrackTitle', 'ArtistName', 'BitRate', 'SampleRate', 'Format', 'DbLength', 'AlbumTitle', 'Genre', 'Comments', 'Year', 'TrackNumber', 'Channels', 'Url', 'Bpm', 'Rating', 'EncodedBy', 'DiscNumber', 'Mood', 'Label', 'Composer', 'Encoder', 'Checksum', 'Lyrics', 'Orchestra', 'Conductor', 'Lyricist', 'OriginalLyricist', 'RadioStationName', 'InfoUrl', 'ArtistUrl', 'AudioSourceUrl', 'RadioStationUrl', 'BuyThisUrl', 'IsrcNumber', 'CatalogNumber', 'OriginalArtist', 'Copyright', 'ReportDatetime', 'ReportLocation', 'ReportOrganization', 'Subject', 'Contributor', 'Language', ),
BasePeer::TYPE_STUDLYPHPNAME => array ('id', 'gunid', 'name', 'mime', 'ftype', 'state', 'currentlyaccessing', 'editedby', 'mtime', 'md5', 'trackTitle', 'artistName', 'bitRate', 'sampleRate', 'format', 'dbLength', 'albumTitle', 'genre', 'comments', 'year', 'trackNumber', 'channels', 'url', 'bpm', 'rating', 'encodedBy', 'discNumber', 'mood', 'label', 'composer', 'encoder', 'checksum', 'lyrics', 'orchestra', 'conductor', 'lyricist', 'originalLyricist', 'radioStationName', 'infoUrl', 'artistUrl', 'audioSourceUrl', 'radioStationUrl', 'buyThisUrl', 'isrcNumber', 'catalogNumber', 'originalArtist', 'copyright', 'reportDatetime', 'reportLocation', 'reportOrganization', 'subject', 'contributor', 'language', ),
BasePeer::TYPE_COLNAME => array (self::ID, self::GUNID, self::NAME, self::MIME, self::FTYPE, self::STATE, self::CURRENTLYACCESSING, self::EDITEDBY, self::MTIME, self::MD5, self::TRACK_TITLE, self::ARTIST_NAME, self::BIT_RATE, self::SAMPLE_RATE, self::FORMAT, self::LENGTH, self::ALBUM_TITLE, self::GENRE, self::COMMENTS, self::YEAR, self::TRACK_NUMBER, self::CHANNELS, self::URL, self::BPM, self::RATING, self::ENCODED_BY, self::DISC_NUMBER, self::MOOD, self::LABEL, self::COMPOSER, self::ENCODER, self::CHECKSUM, self::LYRICS, self::ORCHESTRA, self::CONDUCTOR, self::LYRICIST, self::ORIGINAL_LYRICIST, self::RADIO_STATION_NAME, self::INFO_URL, self::ARTIST_URL, self::AUDIO_SOURCE_URL, self::RADIO_STATION_URL, self::BUY_THIS_URL, self::ISRC_NUMBER, self::CATALOG_NUMBER, self::ORIGINAL_ARTIST, self::COPYRIGHT, self::REPORT_DATETIME, self::REPORT_LOCATION, self::REPORT_ORGANIZATION, self::SUBJECT, self::CONTRIBUTOR, self::LANGUAGE, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'GUNID', 'NAME', 'MIME', 'FTYPE', 'STATE', 'CURRENTLYACCESSING', 'EDITEDBY', 'MTIME', 'MD5', 'TRACK_TITLE', 'ARTIST_NAME', 'BIT_RATE', 'SAMPLE_RATE', 'FORMAT', 'LENGTH', 'ALBUM_TITLE', 'GENRE', 'COMMENTS', 'YEAR', 'TRACK_NUMBER', 'CHANNELS', 'URL', 'BPM', 'RATING', 'ENCODED_BY', 'DISC_NUMBER', 'MOOD', 'LABEL', 'COMPOSER', 'ENCODER', 'CHECKSUM', 'LYRICS', 'ORCHESTRA', 'CONDUCTOR', 'LYRICIST', 'ORIGINAL_LYRICIST', 'RADIO_STATION_NAME', 'INFO_URL', 'ARTIST_URL', 'AUDIO_SOURCE_URL', 'RADIO_STATION_URL', 'BUY_THIS_URL', 'ISRC_NUMBER', 'CATALOG_NUMBER', 'ORIGINAL_ARTIST', 'COPYRIGHT', 'REPORT_DATETIME', 'REPORT_LOCATION', 'REPORT_ORGANIZATION', 'SUBJECT', 'CONTRIBUTOR', 'LANGUAGE', ),
BasePeer::TYPE_FIELDNAME => array ('id', 'gunid', 'name', 'mime', 'ftype', 'state', 'currentlyaccessing', 'editedby', 'mtime', 'md5', 'track_title', 'artist_name', 'bit_rate', 'sample_rate', 'format', 'length', 'album_title', 'genre', 'comments', 'year', 'track_number', 'channels', 'url', 'bpm', 'rating', 'encoded_by', 'disc_number', 'mood', 'label', 'composer', 'encoder', 'checksum', 'lyrics', 'orchestra', 'conductor', 'lyricist', 'original_lyricist', 'radio_station_name', 'info_url', 'artist_url', 'audio_source_url', 'radio_station_url', 'buy_this_url', 'isrc_number', 'catalog_number', 'original_artist', 'copyright', 'report_datetime', 'report_location', 'report_organization', 'subject', 'contributor', 'language', ),
@ -221,8 +221,8 @@ abstract class BaseCcFilesPeer {
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Gunid' => 1, 'Name' => 2, 'Mime' => 3, 'Ftype' => 4, 'State' => 5, 'Currentlyaccessing' => 6, 'Editedby' => 7, 'Mtime' => 8, 'Md5' => 9, 'TrackTitle' => 10, 'ArtistName' => 11, 'BitRate' => 12, 'SampleRate' => 13, 'Format' => 14, 'Length' => 15, 'AlbumTitle' => 16, 'Genre' => 17, 'Comments' => 18, 'Year' => 19, 'TrackNumber' => 20, 'Channels' => 21, 'Url' => 22, 'Bpm' => 23, 'Rating' => 24, 'EncodedBy' => 25, 'DiscNumber' => 26, 'Mood' => 27, 'Label' => 28, 'Composer' => 29, 'Encoder' => 30, 'Checksum' => 31, 'Lyrics' => 32, 'Orchestra' => 33, 'Conductor' => 34, 'Lyricist' => 35, 'OriginalLyricist' => 36, 'RadioStationName' => 37, 'InfoUrl' => 38, 'ArtistUrl' => 39, 'AudioSourceUrl' => 40, 'RadioStationUrl' => 41, 'BuyThisUrl' => 42, 'IsrcNumber' => 43, 'CatalogNumber' => 44, 'OriginalArtist' => 45, 'Copyright' => 46, 'ReportDatetime' => 47, 'ReportLocation' => 48, 'ReportOrganization' => 49, 'Subject' => 50, 'Contributor' => 51, 'Language' => 52, ),
BasePeer::TYPE_STUDLYPHPNAME => array ('id' => 0, 'gunid' => 1, 'name' => 2, 'mime' => 3, 'ftype' => 4, 'state' => 5, 'currentlyaccessing' => 6, 'editedby' => 7, 'mtime' => 8, 'md5' => 9, 'trackTitle' => 10, 'artistName' => 11, 'bitRate' => 12, 'sampleRate' => 13, 'format' => 14, 'length' => 15, 'albumTitle' => 16, 'genre' => 17, 'comments' => 18, 'year' => 19, 'trackNumber' => 20, 'channels' => 21, 'url' => 22, 'bpm' => 23, 'rating' => 24, 'encodedBy' => 25, 'discNumber' => 26, 'mood' => 27, 'label' => 28, 'composer' => 29, 'encoder' => 30, 'checksum' => 31, 'lyrics' => 32, 'orchestra' => 33, 'conductor' => 34, 'lyricist' => 35, 'originalLyricist' => 36, 'radioStationName' => 37, 'infoUrl' => 38, 'artistUrl' => 39, 'audioSourceUrl' => 40, 'radioStationUrl' => 41, 'buyThisUrl' => 42, 'isrcNumber' => 43, 'catalogNumber' => 44, 'originalArtist' => 45, 'copyright' => 46, 'reportDatetime' => 47, 'reportLocation' => 48, 'reportOrganization' => 49, 'subject' => 50, 'contributor' => 51, 'language' => 52, ),
BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Gunid' => 1, 'Name' => 2, 'Mime' => 3, 'Ftype' => 4, 'State' => 5, 'Currentlyaccessing' => 6, 'Editedby' => 7, 'Mtime' => 8, 'Md5' => 9, 'TrackTitle' => 10, 'ArtistName' => 11, 'BitRate' => 12, 'SampleRate' => 13, 'Format' => 14, 'DbLength' => 15, 'AlbumTitle' => 16, 'Genre' => 17, 'Comments' => 18, 'Year' => 19, 'TrackNumber' => 20, 'Channels' => 21, 'Url' => 22, 'Bpm' => 23, 'Rating' => 24, 'EncodedBy' => 25, 'DiscNumber' => 26, 'Mood' => 27, 'Label' => 28, 'Composer' => 29, 'Encoder' => 30, 'Checksum' => 31, 'Lyrics' => 32, 'Orchestra' => 33, 'Conductor' => 34, 'Lyricist' => 35, 'OriginalLyricist' => 36, 'RadioStationName' => 37, 'InfoUrl' => 38, 'ArtistUrl' => 39, 'AudioSourceUrl' => 40, 'RadioStationUrl' => 41, 'BuyThisUrl' => 42, 'IsrcNumber' => 43, 'CatalogNumber' => 44, 'OriginalArtist' => 45, 'Copyright' => 46, 'ReportDatetime' => 47, 'ReportLocation' => 48, 'ReportOrganization' => 49, 'Subject' => 50, 'Contributor' => 51, 'Language' => 52, ),
BasePeer::TYPE_STUDLYPHPNAME => array ('id' => 0, 'gunid' => 1, 'name' => 2, 'mime' => 3, 'ftype' => 4, 'state' => 5, 'currentlyaccessing' => 6, 'editedby' => 7, 'mtime' => 8, 'md5' => 9, 'trackTitle' => 10, 'artistName' => 11, 'bitRate' => 12, 'sampleRate' => 13, 'format' => 14, 'dbLength' => 15, 'albumTitle' => 16, 'genre' => 17, 'comments' => 18, 'year' => 19, 'trackNumber' => 20, 'channels' => 21, 'url' => 22, 'bpm' => 23, 'rating' => 24, 'encodedBy' => 25, 'discNumber' => 26, 'mood' => 27, 'label' => 28, 'composer' => 29, 'encoder' => 30, 'checksum' => 31, 'lyrics' => 32, 'orchestra' => 33, 'conductor' => 34, 'lyricist' => 35, 'originalLyricist' => 36, 'radioStationName' => 37, 'infoUrl' => 38, 'artistUrl' => 39, 'audioSourceUrl' => 40, 'radioStationUrl' => 41, 'buyThisUrl' => 42, 'isrcNumber' => 43, 'catalogNumber' => 44, 'originalArtist' => 45, 'copyright' => 46, 'reportDatetime' => 47, 'reportLocation' => 48, 'reportOrganization' => 49, 'subject' => 50, 'contributor' => 51, 'language' => 52, ),
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::GUNID => 1, self::NAME => 2, self::MIME => 3, self::FTYPE => 4, self::STATE => 5, self::CURRENTLYACCESSING => 6, self::EDITEDBY => 7, self::MTIME => 8, self::MD5 => 9, self::TRACK_TITLE => 10, self::ARTIST_NAME => 11, self::BIT_RATE => 12, self::SAMPLE_RATE => 13, self::FORMAT => 14, self::LENGTH => 15, self::ALBUM_TITLE => 16, self::GENRE => 17, self::COMMENTS => 18, self::YEAR => 19, self::TRACK_NUMBER => 20, self::CHANNELS => 21, self::URL => 22, self::BPM => 23, self::RATING => 24, self::ENCODED_BY => 25, self::DISC_NUMBER => 26, self::MOOD => 27, self::LABEL => 28, self::COMPOSER => 29, self::ENCODER => 30, self::CHECKSUM => 31, self::LYRICS => 32, self::ORCHESTRA => 33, self::CONDUCTOR => 34, self::LYRICIST => 35, self::ORIGINAL_LYRICIST => 36, self::RADIO_STATION_NAME => 37, self::INFO_URL => 38, self::ARTIST_URL => 39, self::AUDIO_SOURCE_URL => 40, self::RADIO_STATION_URL => 41, self::BUY_THIS_URL => 42, self::ISRC_NUMBER => 43, self::CATALOG_NUMBER => 44, self::ORIGINAL_ARTIST => 45, self::COPYRIGHT => 46, self::REPORT_DATETIME => 47, self::REPORT_LOCATION => 48, self::REPORT_ORGANIZATION => 49, self::SUBJECT => 50, self::CONTRIBUTOR => 51, self::LANGUAGE => 52, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'GUNID' => 1, 'NAME' => 2, 'MIME' => 3, 'FTYPE' => 4, 'STATE' => 5, 'CURRENTLYACCESSING' => 6, 'EDITEDBY' => 7, 'MTIME' => 8, 'MD5' => 9, 'TRACK_TITLE' => 10, 'ARTIST_NAME' => 11, 'BIT_RATE' => 12, 'SAMPLE_RATE' => 13, 'FORMAT' => 14, 'LENGTH' => 15, 'ALBUM_TITLE' => 16, 'GENRE' => 17, 'COMMENTS' => 18, 'YEAR' => 19, 'TRACK_NUMBER' => 20, 'CHANNELS' => 21, 'URL' => 22, 'BPM' => 23, 'RATING' => 24, 'ENCODED_BY' => 25, 'DISC_NUMBER' => 26, 'MOOD' => 27, 'LABEL' => 28, 'COMPOSER' => 29, 'ENCODER' => 30, 'CHECKSUM' => 31, 'LYRICS' => 32, 'ORCHESTRA' => 33, 'CONDUCTOR' => 34, 'LYRICIST' => 35, 'ORIGINAL_LYRICIST' => 36, 'RADIO_STATION_NAME' => 37, 'INFO_URL' => 38, 'ARTIST_URL' => 39, 'AUDIO_SOURCE_URL' => 40, 'RADIO_STATION_URL' => 41, 'BUY_THIS_URL' => 42, 'ISRC_NUMBER' => 43, 'CATALOG_NUMBER' => 44, 'ORIGINAL_ARTIST' => 45, 'COPYRIGHT' => 46, 'REPORT_DATETIME' => 47, 'REPORT_LOCATION' => 48, 'REPORT_ORGANIZATION' => 49, 'SUBJECT' => 50, 'CONTRIBUTOR' => 51, 'LANGUAGE' => 52, ),
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'gunid' => 1, 'name' => 2, 'mime' => 3, 'ftype' => 4, 'state' => 5, 'currentlyaccessing' => 6, 'editedby' => 7, 'mtime' => 8, 'md5' => 9, 'track_title' => 10, 'artist_name' => 11, 'bit_rate' => 12, 'sample_rate' => 13, 'format' => 14, 'length' => 15, 'album_title' => 16, 'genre' => 17, 'comments' => 18, 'year' => 19, 'track_number' => 20, 'channels' => 21, 'url' => 22, 'bpm' => 23, 'rating' => 24, 'encoded_by' => 25, 'disc_number' => 26, 'mood' => 27, 'label' => 28, 'composer' => 29, 'encoder' => 30, 'checksum' => 31, 'lyrics' => 32, 'orchestra' => 33, 'conductor' => 34, 'lyricist' => 35, 'original_lyricist' => 36, 'radio_station_name' => 37, 'info_url' => 38, 'artist_url' => 39, 'audio_source_url' => 40, 'radio_station_url' => 41, 'buy_this_url' => 42, 'isrc_number' => 43, 'catalog_number' => 44, 'original_artist' => 45, 'copyright' => 46, 'report_datetime' => 47, 'report_location' => 48, 'report_organization' => 49, 'subject' => 50, 'contributor' => 51, 'language' => 52, ),

View file

@ -21,7 +21,7 @@
* @method CcFilesQuery orderByBitRate($order = Criteria::ASC) Order by the bit_rate column
* @method CcFilesQuery orderBySampleRate($order = Criteria::ASC) Order by the sample_rate column
* @method CcFilesQuery orderByFormat($order = Criteria::ASC) Order by the format column
* @method CcFilesQuery orderByLength($order = Criteria::ASC) Order by the length column
* @method CcFilesQuery orderByDbLength($order = Criteria::ASC) Order by the length column
* @method CcFilesQuery orderByAlbumTitle($order = Criteria::ASC) Order by the album_title column
* @method CcFilesQuery orderByGenre($order = Criteria::ASC) Order by the genre column
* @method CcFilesQuery orderByComments($order = Criteria::ASC) Order by the comments column
@ -75,7 +75,7 @@
* @method CcFilesQuery groupByBitRate() Group by the bit_rate column
* @method CcFilesQuery groupBySampleRate() Group by the sample_rate column
* @method CcFilesQuery groupByFormat() Group by the format column
* @method CcFilesQuery groupByLength() Group by the length column
* @method CcFilesQuery groupByDbLength() Group by the length column
* @method CcFilesQuery groupByAlbumTitle() Group by the album_title column
* @method CcFilesQuery groupByGenre() Group by the genre column
* @method CcFilesQuery groupByComments() Group by the comments column
@ -144,7 +144,7 @@
* @method CcFiles findOneByBitRate(string $bit_rate) Return the first CcFiles filtered by the bit_rate column
* @method CcFiles findOneBySampleRate(string $sample_rate) Return the first CcFiles filtered by the sample_rate column
* @method CcFiles findOneByFormat(string $format) Return the first CcFiles filtered by the format column
* @method CcFiles findOneByLength(string $length) Return the first CcFiles filtered by the length column
* @method CcFiles findOneByDbLength(string $length) Return the first CcFiles filtered by the length column
* @method CcFiles findOneByAlbumTitle(string $album_title) Return the first CcFiles filtered by the album_title column
* @method CcFiles findOneByGenre(string $genre) Return the first CcFiles filtered by the genre column
* @method CcFiles findOneByComments(string $comments) Return the first CcFiles filtered by the comments column
@ -198,7 +198,7 @@
* @method array findByBitRate(string $bit_rate) Return CcFiles objects filtered by the bit_rate column
* @method array findBySampleRate(string $sample_rate) Return CcFiles objects filtered by the sample_rate column
* @method array findByFormat(string $format) Return CcFiles objects filtered by the format column
* @method array findByLength(string $length) Return CcFiles objects filtered by the length column
* @method array findByDbLength(string $length) Return CcFiles objects filtered by the length column
* @method array findByAlbumTitle(string $album_title) Return CcFiles objects filtered by the album_title column
* @method array findByGenre(string $genre) Return CcFiles objects filtered by the genre column
* @method array findByComments(string $comments) Return CcFiles objects filtered by the comments column
@ -709,22 +709,22 @@ abstract class BaseCcFilesQuery extends ModelCriteria
/**
* Filter the query on the length column
*
* @param string|array $length The value to use as filter.
* @param string|array $dbLength 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 CcFilesQuery The current query, for fluid interface
*/
public function filterByLength($length = null, $comparison = null)
public function filterByDbLength($dbLength = null, $comparison = null)
{
if (is_array($length)) {
if (is_array($dbLength)) {
$useMinMax = false;
if (isset($length['min'])) {
$this->addUsingAlias(CcFilesPeer::LENGTH, $length['min'], Criteria::GREATER_EQUAL);
if (isset($dbLength['min'])) {
$this->addUsingAlias(CcFilesPeer::LENGTH, $dbLength['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($length['max'])) {
$this->addUsingAlias(CcFilesPeer::LENGTH, $length['max'], Criteria::LESS_EQUAL);
if (isset($dbLength['max'])) {
$this->addUsingAlias(CcFilesPeer::LENGTH, $dbLength['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
@ -734,7 +734,7 @@ abstract class BaseCcFilesQuery extends ModelCriteria
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcFilesPeer::LENGTH, $length, $comparison);
return $this->addUsingAlias(CcFilesPeer::LENGTH, $dbLength, $comparison);
}
/**

View file

@ -47,7 +47,7 @@
<column name="bit_rate" phpName="BitRate" type="VARCHAR" size="32" required="false"/>
<column name="sample_rate" phpName="SampleRate" type="VARCHAR" size="32" required="false"/>
<column name="format" phpName="Format" type="VARCHAR" size="128" required="false"/>
<column name="length" phpName="Length" type="TIME" required="false"/>
<column name="length" phpName="DbLength" type="TIME" required="false"/>
<column name="album_title" phpName="AlbumTitle" type="VARCHAR" size="512" required="false"/>
<column name="genre" phpName="Genre" type="VARCHAR" size="64" required="false"/>
<column name="comments" phpName="Comments" type="LONGVARCHAR" required="false"/>