Bunch of schema changes
This commit is contained in:
parent
c7dd2e7256
commit
cfb21f8425
28 changed files with 1647 additions and 5494 deletions
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* @package propel.generator.airtime.om
|
||||
*/
|
||||
abstract class BaseImportedPodcastPeer extends PodcastPeer
|
||||
abstract class BaseImportedPodcastPeer
|
||||
{
|
||||
|
||||
/** the default database name for this class */
|
||||
|
@ -24,13 +24,16 @@ abstract class BaseImportedPodcastPeer extends PodcastPeer
|
|||
const TM_CLASS = 'ImportedPodcastTableMap';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 16;
|
||||
const NUM_COLUMNS = 4;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
|
||||
/** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */
|
||||
const NUM_HYDRATE_COLUMNS = 16;
|
||||
const NUM_HYDRATE_COLUMNS = 4;
|
||||
|
||||
/** the column name for the id field */
|
||||
const ID = 'imported_podcast.id';
|
||||
|
||||
/** the column name for the url field */
|
||||
const URL = 'imported_podcast.url';
|
||||
|
@ -38,47 +41,8 @@ abstract class BaseImportedPodcastPeer extends PodcastPeer
|
|||
/** the column name for the auto_ingest field */
|
||||
const AUTO_INGEST = 'imported_podcast.auto_ingest';
|
||||
|
||||
/** the column name for the id field */
|
||||
const ID = 'imported_podcast.id';
|
||||
|
||||
/** the column name for the title field */
|
||||
const TITLE = 'imported_podcast.title';
|
||||
|
||||
/** the column name for the creator field */
|
||||
const CREATOR = 'imported_podcast.creator';
|
||||
|
||||
/** the column name for the description field */
|
||||
const DESCRIPTION = 'imported_podcast.description';
|
||||
|
||||
/** the column name for the language field */
|
||||
const LANGUAGE = 'imported_podcast.language';
|
||||
|
||||
/** the column name for the copyright field */
|
||||
const COPYRIGHT = 'imported_podcast.copyright';
|
||||
|
||||
/** the column name for the link field */
|
||||
const LINK = 'imported_podcast.link';
|
||||
|
||||
/** the column name for the itunes_author field */
|
||||
const ITUNES_AUTHOR = 'imported_podcast.itunes_author';
|
||||
|
||||
/** the column name for the itunes_keywords field */
|
||||
const ITUNES_KEYWORDS = 'imported_podcast.itunes_keywords';
|
||||
|
||||
/** the column name for the itunes_summary field */
|
||||
const ITUNES_SUMMARY = 'imported_podcast.itunes_summary';
|
||||
|
||||
/** the column name for the itunes_subtitle field */
|
||||
const ITUNES_SUBTITLE = 'imported_podcast.itunes_subtitle';
|
||||
|
||||
/** the column name for the itunes_category field */
|
||||
const ITUNES_CATEGORY = 'imported_podcast.itunes_category';
|
||||
|
||||
/** the column name for the itunes_explicit field */
|
||||
const ITUNES_EXPLICIT = 'imported_podcast.itunes_explicit';
|
||||
|
||||
/** the column name for the owner field */
|
||||
const OWNER = 'imported_podcast.owner';
|
||||
/** the column name for the podcast_id field */
|
||||
const PODCAST_ID = 'imported_podcast.podcast_id';
|
||||
|
||||
/** The default string format for model objects of the related table **/
|
||||
const DEFAULT_STRING_FORMAT = 'YAML';
|
||||
|
@ -99,12 +63,12 @@ abstract class BaseImportedPodcastPeer extends PodcastPeer
|
|||
* e.g. ImportedPodcastPeer::$fieldNames[ImportedPodcastPeer::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
protected static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbUrl', 'DbAutoIngest', 'DbId', 'DbTitle', 'DbCreator', 'DbDescription', 'DbLanguage', 'DbCopyright', 'DbLink', 'DbItunesAuthor', 'DbItunesKeywords', 'DbItunesSummary', 'DbItunesSubtitle', 'DbItunesCategory', 'DbItunesExplicit', 'DbOwner', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbUrl', 'dbAutoIngest', 'dbId', 'dbTitle', 'dbCreator', 'dbDescription', 'dbLanguage', 'dbCopyright', 'dbLink', 'dbItunesAuthor', 'dbItunesKeywords', 'dbItunesSummary', 'dbItunesSubtitle', 'dbItunesCategory', 'dbItunesExplicit', 'dbOwner', ),
|
||||
BasePeer::TYPE_COLNAME => array (ImportedPodcastPeer::URL, ImportedPodcastPeer::AUTO_INGEST, ImportedPodcastPeer::ID, ImportedPodcastPeer::TITLE, ImportedPodcastPeer::CREATOR, ImportedPodcastPeer::DESCRIPTION, ImportedPodcastPeer::LANGUAGE, ImportedPodcastPeer::COPYRIGHT, ImportedPodcastPeer::LINK, ImportedPodcastPeer::ITUNES_AUTHOR, ImportedPodcastPeer::ITUNES_KEYWORDS, ImportedPodcastPeer::ITUNES_SUMMARY, ImportedPodcastPeer::ITUNES_SUBTITLE, ImportedPodcastPeer::ITUNES_CATEGORY, ImportedPodcastPeer::ITUNES_EXPLICIT, ImportedPodcastPeer::OWNER, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('URL', 'AUTO_INGEST', 'ID', 'TITLE', 'CREATOR', 'DESCRIPTION', 'LANGUAGE', 'COPYRIGHT', 'LINK', 'ITUNES_AUTHOR', 'ITUNES_KEYWORDS', 'ITUNES_SUMMARY', 'ITUNES_SUBTITLE', 'ITUNES_CATEGORY', 'ITUNES_EXPLICIT', 'OWNER', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('url', 'auto_ingest', 'id', 'title', 'creator', 'description', 'language', 'copyright', 'link', 'itunes_author', 'itunes_keywords', 'itunes_summary', 'itunes_subtitle', 'itunes_category', 'itunes_explicit', 'owner', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbUrl', 'DbAutoIngest', 'DbPodcastId', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbUrl', 'dbAutoIngest', 'dbPodcastId', ),
|
||||
BasePeer::TYPE_COLNAME => array (ImportedPodcastPeer::ID, ImportedPodcastPeer::URL, ImportedPodcastPeer::AUTO_INGEST, ImportedPodcastPeer::PODCAST_ID, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'URL', 'AUTO_INGEST', 'PODCAST_ID', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'url', 'auto_ingest', 'podcast_id', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -114,12 +78,12 @@ abstract class BaseImportedPodcastPeer extends PodcastPeer
|
|||
* e.g. ImportedPodcastPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
protected static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbUrl' => 0, 'DbAutoIngest' => 1, 'DbId' => 2, 'DbTitle' => 3, 'DbCreator' => 4, 'DbDescription' => 5, 'DbLanguage' => 6, 'DbCopyright' => 7, 'DbLink' => 8, 'DbItunesAuthor' => 9, 'DbItunesKeywords' => 10, 'DbItunesSummary' => 11, 'DbItunesSubtitle' => 12, 'DbItunesCategory' => 13, 'DbItunesExplicit' => 14, 'DbOwner' => 15, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbUrl' => 0, 'dbAutoIngest' => 1, 'dbId' => 2, 'dbTitle' => 3, 'dbCreator' => 4, 'dbDescription' => 5, 'dbLanguage' => 6, 'dbCopyright' => 7, 'dbLink' => 8, 'dbItunesAuthor' => 9, 'dbItunesKeywords' => 10, 'dbItunesSummary' => 11, 'dbItunesSubtitle' => 12, 'dbItunesCategory' => 13, 'dbItunesExplicit' => 14, 'dbOwner' => 15, ),
|
||||
BasePeer::TYPE_COLNAME => array (ImportedPodcastPeer::URL => 0, ImportedPodcastPeer::AUTO_INGEST => 1, ImportedPodcastPeer::ID => 2, ImportedPodcastPeer::TITLE => 3, ImportedPodcastPeer::CREATOR => 4, ImportedPodcastPeer::DESCRIPTION => 5, ImportedPodcastPeer::LANGUAGE => 6, ImportedPodcastPeer::COPYRIGHT => 7, ImportedPodcastPeer::LINK => 8, ImportedPodcastPeer::ITUNES_AUTHOR => 9, ImportedPodcastPeer::ITUNES_KEYWORDS => 10, ImportedPodcastPeer::ITUNES_SUMMARY => 11, ImportedPodcastPeer::ITUNES_SUBTITLE => 12, ImportedPodcastPeer::ITUNES_CATEGORY => 13, ImportedPodcastPeer::ITUNES_EXPLICIT => 14, ImportedPodcastPeer::OWNER => 15, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('URL' => 0, 'AUTO_INGEST' => 1, 'ID' => 2, 'TITLE' => 3, 'CREATOR' => 4, 'DESCRIPTION' => 5, 'LANGUAGE' => 6, 'COPYRIGHT' => 7, 'LINK' => 8, 'ITUNES_AUTHOR' => 9, 'ITUNES_KEYWORDS' => 10, 'ITUNES_SUMMARY' => 11, 'ITUNES_SUBTITLE' => 12, 'ITUNES_CATEGORY' => 13, 'ITUNES_EXPLICIT' => 14, 'OWNER' => 15, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('url' => 0, 'auto_ingest' => 1, 'id' => 2, 'title' => 3, 'creator' => 4, 'description' => 5, 'language' => 6, 'copyright' => 7, 'link' => 8, 'itunes_author' => 9, 'itunes_keywords' => 10, 'itunes_summary' => 11, 'itunes_subtitle' => 12, 'itunes_category' => 13, 'itunes_explicit' => 14, 'owner' => 15, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbUrl' => 1, 'DbAutoIngest' => 2, 'DbPodcastId' => 3, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbUrl' => 1, 'dbAutoIngest' => 2, 'dbPodcastId' => 3, ),
|
||||
BasePeer::TYPE_COLNAME => array (ImportedPodcastPeer::ID => 0, ImportedPodcastPeer::URL => 1, ImportedPodcastPeer::AUTO_INGEST => 2, ImportedPodcastPeer::PODCAST_ID => 3, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'URL' => 1, 'AUTO_INGEST' => 2, 'PODCAST_ID' => 3, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'url' => 1, 'auto_ingest' => 2, 'podcast_id' => 3, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -193,39 +157,15 @@ abstract class BaseImportedPodcastPeer extends PodcastPeer
|
|||
public static function addSelectColumns(Criteria $criteria, $alias = null)
|
||||
{
|
||||
if (null === $alias) {
|
||||
$criteria->addSelectColumn(ImportedPodcastPeer::ID);
|
||||
$criteria->addSelectColumn(ImportedPodcastPeer::URL);
|
||||
$criteria->addSelectColumn(ImportedPodcastPeer::AUTO_INGEST);
|
||||
$criteria->addSelectColumn(ImportedPodcastPeer::ID);
|
||||
$criteria->addSelectColumn(ImportedPodcastPeer::TITLE);
|
||||
$criteria->addSelectColumn(ImportedPodcastPeer::CREATOR);
|
||||
$criteria->addSelectColumn(ImportedPodcastPeer::DESCRIPTION);
|
||||
$criteria->addSelectColumn(ImportedPodcastPeer::LANGUAGE);
|
||||
$criteria->addSelectColumn(ImportedPodcastPeer::COPYRIGHT);
|
||||
$criteria->addSelectColumn(ImportedPodcastPeer::LINK);
|
||||
$criteria->addSelectColumn(ImportedPodcastPeer::ITUNES_AUTHOR);
|
||||
$criteria->addSelectColumn(ImportedPodcastPeer::ITUNES_KEYWORDS);
|
||||
$criteria->addSelectColumn(ImportedPodcastPeer::ITUNES_SUMMARY);
|
||||
$criteria->addSelectColumn(ImportedPodcastPeer::ITUNES_SUBTITLE);
|
||||
$criteria->addSelectColumn(ImportedPodcastPeer::ITUNES_CATEGORY);
|
||||
$criteria->addSelectColumn(ImportedPodcastPeer::ITUNES_EXPLICIT);
|
||||
$criteria->addSelectColumn(ImportedPodcastPeer::OWNER);
|
||||
$criteria->addSelectColumn(ImportedPodcastPeer::PODCAST_ID);
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.id');
|
||||
$criteria->addSelectColumn($alias . '.url');
|
||||
$criteria->addSelectColumn($alias . '.auto_ingest');
|
||||
$criteria->addSelectColumn($alias . '.id');
|
||||
$criteria->addSelectColumn($alias . '.title');
|
||||
$criteria->addSelectColumn($alias . '.creator');
|
||||
$criteria->addSelectColumn($alias . '.description');
|
||||
$criteria->addSelectColumn($alias . '.language');
|
||||
$criteria->addSelectColumn($alias . '.copyright');
|
||||
$criteria->addSelectColumn($alias . '.link');
|
||||
$criteria->addSelectColumn($alias . '.itunes_author');
|
||||
$criteria->addSelectColumn($alias . '.itunes_keywords');
|
||||
$criteria->addSelectColumn($alias . '.itunes_summary');
|
||||
$criteria->addSelectColumn($alias . '.itunes_subtitle');
|
||||
$criteria->addSelectColumn($alias . '.itunes_category');
|
||||
$criteria->addSelectColumn($alias . '.itunes_explicit');
|
||||
$criteria->addSelectColumn($alias . '.owner');
|
||||
$criteria->addSelectColumn($alias . '.podcast_id');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -445,11 +385,11 @@ abstract class BaseImportedPodcastPeer extends PodcastPeer
|
|||
public static function getPrimaryKeyHashFromRow($row, $startcol = 0)
|
||||
{
|
||||
// If the PK cannot be derived from the row, return null.
|
||||
if ($row[$startcol + 2] === null) {
|
||||
if ($row[$startcol] === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (string) $row[$startcol + 2];
|
||||
return (string) $row[$startcol];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -464,7 +404,7 @@ abstract class BaseImportedPodcastPeer extends PodcastPeer
|
|||
public static function getPrimaryKeyFromRow($row, $startcol = 0)
|
||||
{
|
||||
|
||||
return (int) $row[$startcol + 2];
|
||||
return (int) $row[$startcol];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -563,58 +503,7 @@ abstract class BaseImportedPodcastPeer extends PodcastPeer
|
|||
$con = Propel::getConnection(ImportedPodcastPeer::DATABASE_NAME, Propel::CONNECTION_READ);
|
||||
}
|
||||
|
||||
$criteria->addJoin(ImportedPodcastPeer::ID, PodcastPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doCount($criteria, $con);
|
||||
|
||||
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
$count = (int) $row[0];
|
||||
} else {
|
||||
$count = 0; // no rows returned; we infer that means 0 matches.
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
|
||||
return $count;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria, joining the related CcSubjs table
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
|
||||
* @param PropelPDO $con
|
||||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return int Number of matching rows.
|
||||
*/
|
||||
public static function doCountJoinCcSubjs(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;
|
||||
|
||||
// We need to set the primary table name, since in the case that there are no WHERE columns
|
||||
// it will be impossible for the BasePeer::createSelectSql() method to determine which
|
||||
// tables go into the FROM clause.
|
||||
$criteria->setPrimaryTableName(ImportedPodcastPeer::TABLE_NAME);
|
||||
|
||||
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
|
||||
$criteria->setDistinct();
|
||||
}
|
||||
|
||||
if (!$criteria->hasSelectClause()) {
|
||||
ImportedPodcastPeer::addSelectColumns($criteria);
|
||||
}
|
||||
|
||||
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
|
||||
|
||||
// Set the correct dbName
|
||||
$criteria->setDbName(ImportedPodcastPeer::DATABASE_NAME);
|
||||
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(ImportedPodcastPeer::DATABASE_NAME, Propel::CONNECTION_READ);
|
||||
}
|
||||
|
||||
$criteria->addJoin(ImportedPodcastPeer::OWNER, CcSubjsPeer::ID, $join_behavior);
|
||||
$criteria->addJoin(ImportedPodcastPeer::PODCAST_ID, PodcastPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doCount($criteria, $con);
|
||||
|
||||
|
@ -651,7 +540,7 @@ abstract class BaseImportedPodcastPeer extends PodcastPeer
|
|||
$startcol = ImportedPodcastPeer::NUM_HYDRATE_COLUMNS;
|
||||
PodcastPeer::addSelectColumns($criteria);
|
||||
|
||||
$criteria->addJoin(ImportedPodcastPeer::ID, PodcastPeer::ID, $join_behavior);
|
||||
$criteria->addJoin(ImportedPodcastPeer::PODCAST_ID, PodcastPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doSelect($criteria, $con);
|
||||
$results = array();
|
||||
|
@ -684,74 +573,6 @@ abstract class BaseImportedPodcastPeer extends PodcastPeer
|
|||
} // if obj2 already loaded
|
||||
|
||||
// Add the $obj1 (ImportedPodcast) to $obj2 (Podcast)
|
||||
// one to one relationship
|
||||
$obj1->setPodcast($obj2);
|
||||
|
||||
} // if joined row was not null
|
||||
|
||||
$results[] = $obj1;
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Selects a collection of ImportedPodcast objects pre-filled with their CcSubjs objects.
|
||||
* @param Criteria $criteria
|
||||
* @param PropelPDO $con
|
||||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return array Array of ImportedPodcast objects.
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function doSelectJoinCcSubjs(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$criteria = clone $criteria;
|
||||
|
||||
// Set the correct dbName if it has not been overridden
|
||||
if ($criteria->getDbName() == Propel::getDefaultDB()) {
|
||||
$criteria->setDbName(ImportedPodcastPeer::DATABASE_NAME);
|
||||
}
|
||||
|
||||
ImportedPodcastPeer::addSelectColumns($criteria);
|
||||
$startcol = ImportedPodcastPeer::NUM_HYDRATE_COLUMNS;
|
||||
CcSubjsPeer::addSelectColumns($criteria);
|
||||
|
||||
$criteria->addJoin(ImportedPodcastPeer::OWNER, CcSubjsPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doSelect($criteria, $con);
|
||||
$results = array();
|
||||
|
||||
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
$key1 = ImportedPodcastPeer::getPrimaryKeyHashFromRow($row, 0);
|
||||
if (null !== ($obj1 = ImportedPodcastPeer::getInstanceFromPool($key1))) {
|
||||
// We no longer rehydrate the object, since this can cause data loss.
|
||||
// See http://www.propelorm.org/ticket/509
|
||||
// $obj1->hydrate($row, 0, true); // rehydrate
|
||||
} else {
|
||||
|
||||
$cls = ImportedPodcastPeer::getOMClass();
|
||||
|
||||
$obj1 = new $cls();
|
||||
$obj1->hydrate($row);
|
||||
ImportedPodcastPeer::addInstanceToPool($obj1, $key1);
|
||||
} // if $obj1 already loaded
|
||||
|
||||
$key2 = CcSubjsPeer::getPrimaryKeyHashFromRow($row, $startcol);
|
||||
if ($key2 !== null) {
|
||||
$obj2 = CcSubjsPeer::getInstanceFromPool($key2);
|
||||
if (!$obj2) {
|
||||
|
||||
$cls = CcSubjsPeer::getOMClass();
|
||||
|
||||
$obj2 = new $cls();
|
||||
$obj2->hydrate($row, $startcol);
|
||||
CcSubjsPeer::addInstanceToPool($obj2, $key2);
|
||||
} // if obj2 already loaded
|
||||
|
||||
// Add the $obj1 (ImportedPodcast) to $obj2 (CcSubjs)
|
||||
$obj2->addImportedPodcast($obj1);
|
||||
|
||||
} // if joined row was not null
|
||||
|
@ -800,9 +621,7 @@ abstract class BaseImportedPodcastPeer extends PodcastPeer
|
|||
$con = Propel::getConnection(ImportedPodcastPeer::DATABASE_NAME, Propel::CONNECTION_READ);
|
||||
}
|
||||
|
||||
$criteria->addJoin(ImportedPodcastPeer::ID, PodcastPeer::ID, $join_behavior);
|
||||
|
||||
$criteria->addJoin(ImportedPodcastPeer::OWNER, CcSubjsPeer::ID, $join_behavior);
|
||||
$criteria->addJoin(ImportedPodcastPeer::PODCAST_ID, PodcastPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doCount($criteria, $con);
|
||||
|
||||
|
@ -841,12 +660,7 @@ abstract class BaseImportedPodcastPeer extends PodcastPeer
|
|||
PodcastPeer::addSelectColumns($criteria);
|
||||
$startcol3 = $startcol2 + PodcastPeer::NUM_HYDRATE_COLUMNS;
|
||||
|
||||
CcSubjsPeer::addSelectColumns($criteria);
|
||||
$startcol4 = $startcol3 + CcSubjsPeer::NUM_HYDRATE_COLUMNS;
|
||||
|
||||
$criteria->addJoin(ImportedPodcastPeer::ID, PodcastPeer::ID, $join_behavior);
|
||||
|
||||
$criteria->addJoin(ImportedPodcastPeer::OWNER, CcSubjsPeer::ID, $join_behavior);
|
||||
$criteria->addJoin(ImportedPodcastPeer::PODCAST_ID, PodcastPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doSelect($criteria, $con);
|
||||
$results = array();
|
||||
|
@ -880,276 +694,8 @@ abstract class BaseImportedPodcastPeer extends PodcastPeer
|
|||
} // if obj2 loaded
|
||||
|
||||
// Add the $obj1 (ImportedPodcast) to the collection in $obj2 (Podcast)
|
||||
$obj1->setPodcast($obj2);
|
||||
} // if joined row not null
|
||||
|
||||
// Add objects for joined CcSubjs rows
|
||||
|
||||
$key3 = CcSubjsPeer::getPrimaryKeyHashFromRow($row, $startcol3);
|
||||
if ($key3 !== null) {
|
||||
$obj3 = CcSubjsPeer::getInstanceFromPool($key3);
|
||||
if (!$obj3) {
|
||||
|
||||
$cls = CcSubjsPeer::getOMClass();
|
||||
|
||||
$obj3 = new $cls();
|
||||
$obj3->hydrate($row, $startcol3);
|
||||
CcSubjsPeer::addInstanceToPool($obj3, $key3);
|
||||
} // if obj3 loaded
|
||||
|
||||
// Add the $obj1 (ImportedPodcast) to the collection in $obj3 (CcSubjs)
|
||||
$obj3->addImportedPodcast($obj1);
|
||||
} // if joined row not null
|
||||
|
||||
$results[] = $obj1;
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria, joining the related Podcast table
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
|
||||
* @param PropelPDO $con
|
||||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return int Number of matching rows.
|
||||
*/
|
||||
public static function doCountJoinAllExceptPodcast(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;
|
||||
|
||||
// We need to set the primary table name, since in the case that there are no WHERE columns
|
||||
// it will be impossible for the BasePeer::createSelectSql() method to determine which
|
||||
// tables go into the FROM clause.
|
||||
$criteria->setPrimaryTableName(ImportedPodcastPeer::TABLE_NAME);
|
||||
|
||||
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
|
||||
$criteria->setDistinct();
|
||||
}
|
||||
|
||||
if (!$criteria->hasSelectClause()) {
|
||||
ImportedPodcastPeer::addSelectColumns($criteria);
|
||||
}
|
||||
|
||||
$criteria->clearOrderByColumns(); // ORDER BY should not affect count
|
||||
|
||||
// Set the correct dbName
|
||||
$criteria->setDbName(ImportedPodcastPeer::DATABASE_NAME);
|
||||
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(ImportedPodcastPeer::DATABASE_NAME, Propel::CONNECTION_READ);
|
||||
}
|
||||
|
||||
$criteria->addJoin(ImportedPodcastPeer::OWNER, CcSubjsPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doCount($criteria, $con);
|
||||
|
||||
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
$count = (int) $row[0];
|
||||
} else {
|
||||
$count = 0; // no rows returned; we infer that means 0 matches.
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
|
||||
return $count;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria, joining the related CcSubjs table
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
|
||||
* @param PropelPDO $con
|
||||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return int Number of matching rows.
|
||||
*/
|
||||
public static function doCountJoinAllExceptCcSubjs(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;
|
||||
|
||||
// We need to set the primary table name, since in the case that there are no WHERE columns
|
||||
// it will be impossible for the BasePeer::createSelectSql() method to determine which
|
||||
// tables go into the FROM clause.
|
||||
$criteria->setPrimaryTableName(ImportedPodcastPeer::TABLE_NAME);
|
||||
|
||||
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
|
||||
$criteria->setDistinct();
|
||||
}
|
||||
|
||||
if (!$criteria->hasSelectClause()) {
|
||||
ImportedPodcastPeer::addSelectColumns($criteria);
|
||||
}
|
||||
|
||||
$criteria->clearOrderByColumns(); // ORDER BY should not affect count
|
||||
|
||||
// Set the correct dbName
|
||||
$criteria->setDbName(ImportedPodcastPeer::DATABASE_NAME);
|
||||
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(ImportedPodcastPeer::DATABASE_NAME, Propel::CONNECTION_READ);
|
||||
}
|
||||
|
||||
$criteria->addJoin(ImportedPodcastPeer::ID, PodcastPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doCount($criteria, $con);
|
||||
|
||||
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
$count = (int) $row[0];
|
||||
} else {
|
||||
$count = 0; // no rows returned; we infer that means 0 matches.
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
|
||||
return $count;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Selects a collection of ImportedPodcast objects pre-filled with all related objects except Podcast.
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param PropelPDO $con
|
||||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return array Array of ImportedPodcast objects.
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function doSelectJoinAllExceptPodcast(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$criteria = clone $criteria;
|
||||
|
||||
// Set the correct dbName if it has not been overridden
|
||||
// $criteria->getDbName() will return the same object if not set to another value
|
||||
// so == check is okay and faster
|
||||
if ($criteria->getDbName() == Propel::getDefaultDB()) {
|
||||
$criteria->setDbName(ImportedPodcastPeer::DATABASE_NAME);
|
||||
}
|
||||
|
||||
ImportedPodcastPeer::addSelectColumns($criteria);
|
||||
$startcol2 = ImportedPodcastPeer::NUM_HYDRATE_COLUMNS;
|
||||
|
||||
CcSubjsPeer::addSelectColumns($criteria);
|
||||
$startcol3 = $startcol2 + CcSubjsPeer::NUM_HYDRATE_COLUMNS;
|
||||
|
||||
$criteria->addJoin(ImportedPodcastPeer::OWNER, CcSubjsPeer::ID, $join_behavior);
|
||||
|
||||
|
||||
$stmt = BasePeer::doSelect($criteria, $con);
|
||||
$results = array();
|
||||
|
||||
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
$key1 = ImportedPodcastPeer::getPrimaryKeyHashFromRow($row, 0);
|
||||
if (null !== ($obj1 = ImportedPodcastPeer::getInstanceFromPool($key1))) {
|
||||
// We no longer rehydrate the object, since this can cause data loss.
|
||||
// See http://www.propelorm.org/ticket/509
|
||||
// $obj1->hydrate($row, 0, true); // rehydrate
|
||||
} else {
|
||||
$cls = ImportedPodcastPeer::getOMClass();
|
||||
|
||||
$obj1 = new $cls();
|
||||
$obj1->hydrate($row);
|
||||
ImportedPodcastPeer::addInstanceToPool($obj1, $key1);
|
||||
} // if obj1 already loaded
|
||||
|
||||
// Add objects for joined CcSubjs rows
|
||||
|
||||
$key2 = CcSubjsPeer::getPrimaryKeyHashFromRow($row, $startcol2);
|
||||
if ($key2 !== null) {
|
||||
$obj2 = CcSubjsPeer::getInstanceFromPool($key2);
|
||||
if (!$obj2) {
|
||||
|
||||
$cls = CcSubjsPeer::getOMClass();
|
||||
|
||||
$obj2 = new $cls();
|
||||
$obj2->hydrate($row, $startcol2);
|
||||
CcSubjsPeer::addInstanceToPool($obj2, $key2);
|
||||
} // if $obj2 already loaded
|
||||
|
||||
// Add the $obj1 (ImportedPodcast) to the collection in $obj2 (CcSubjs)
|
||||
$obj2->addImportedPodcast($obj1);
|
||||
|
||||
} // if joined row is not null
|
||||
|
||||
$results[] = $obj1;
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Selects a collection of ImportedPodcast objects pre-filled with all related objects except CcSubjs.
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param PropelPDO $con
|
||||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return array Array of ImportedPodcast objects.
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function doSelectJoinAllExceptCcSubjs(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$criteria = clone $criteria;
|
||||
|
||||
// Set the correct dbName if it has not been overridden
|
||||
// $criteria->getDbName() will return the same object if not set to another value
|
||||
// so == check is okay and faster
|
||||
if ($criteria->getDbName() == Propel::getDefaultDB()) {
|
||||
$criteria->setDbName(ImportedPodcastPeer::DATABASE_NAME);
|
||||
}
|
||||
|
||||
ImportedPodcastPeer::addSelectColumns($criteria);
|
||||
$startcol2 = ImportedPodcastPeer::NUM_HYDRATE_COLUMNS;
|
||||
|
||||
PodcastPeer::addSelectColumns($criteria);
|
||||
$startcol3 = $startcol2 + PodcastPeer::NUM_HYDRATE_COLUMNS;
|
||||
|
||||
$criteria->addJoin(ImportedPodcastPeer::ID, PodcastPeer::ID, $join_behavior);
|
||||
|
||||
|
||||
$stmt = BasePeer::doSelect($criteria, $con);
|
||||
$results = array();
|
||||
|
||||
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
$key1 = ImportedPodcastPeer::getPrimaryKeyHashFromRow($row, 0);
|
||||
if (null !== ($obj1 = ImportedPodcastPeer::getInstanceFromPool($key1))) {
|
||||
// We no longer rehydrate the object, since this can cause data loss.
|
||||
// See http://www.propelorm.org/ticket/509
|
||||
// $obj1->hydrate($row, 0, true); // rehydrate
|
||||
} else {
|
||||
$cls = ImportedPodcastPeer::getOMClass();
|
||||
|
||||
$obj1 = new $cls();
|
||||
$obj1->hydrate($row);
|
||||
ImportedPodcastPeer::addInstanceToPool($obj1, $key1);
|
||||
} // if obj1 already loaded
|
||||
|
||||
// Add objects for joined Podcast rows
|
||||
|
||||
$key2 = PodcastPeer::getPrimaryKeyHashFromRow($row, $startcol2);
|
||||
if ($key2 !== null) {
|
||||
$obj2 = PodcastPeer::getInstanceFromPool($key2);
|
||||
if (!$obj2) {
|
||||
|
||||
$cls = PodcastPeer::getOMClass();
|
||||
|
||||
$obj2 = new $cls();
|
||||
$obj2->hydrate($row, $startcol2);
|
||||
PodcastPeer::addInstanceToPool($obj2, $key2);
|
||||
} // if $obj2 already loaded
|
||||
|
||||
// Add the $obj1 (ImportedPodcast) to the collection in $obj2 (Podcast)
|
||||
$obj1->setPodcast($obj2);
|
||||
|
||||
} // if joined row is not null
|
||||
} // if joined row not null
|
||||
|
||||
$results[] = $obj1;
|
||||
}
|
||||
|
@ -1213,6 +759,10 @@ abstract class BaseImportedPodcastPeer extends PodcastPeer
|
|||
$criteria = $values->buildCriteria(); // build Criteria from ImportedPodcast object
|
||||
}
|
||||
|
||||
if ($criteria->containsKey(ImportedPodcastPeer::ID) && $criteria->keyContainsValue(ImportedPodcastPeer::ID) ) {
|
||||
throw new PropelException('Cannot insert a value for auto-increment primary key ('.ImportedPodcastPeer::ID.')');
|
||||
}
|
||||
|
||||
|
||||
// Set the correct dbName
|
||||
$criteria->setDbName(ImportedPodcastPeer::DATABASE_NAME);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue