<?php


abstract class BaseTblblogentryPeer {

	
	const DATABASE_NAME = 'propel';

	
	const TABLE_NAME = 'tblblogentry';

	
	const CLASS_DEFAULT = 'lib.model.Tblblogentry';

	
	const NUM_COLUMNS = 18;

	
	const NUM_LAZY_LOAD_COLUMNS = 1;

	
	const ENTRY_ID = 'tblblogentry.ENTRY_ID';

	
	const ENTRY_USER = 'tblblogentry.ENTRY_USER';

	
	const ENTRY_LINK = 'tblblogentry.ENTRY_LINK';

	
	const ENTRY_TITLE = 'tblblogentry.ENTRY_TITLE';

	
	const ENTRY_CONTENT = 'tblblogentry.ENTRY_CONTENT';

	
	const ENTRY_CREATEDATE = 'tblblogentry.ENTRY_CREATEDATE';

	
	const ENTRY_MODIFYDATE = 'tblblogentry.ENTRY_MODIFYDATE';

	
	const ENTRY_HIT = 'tblblogentry.ENTRY_HIT';

	
	const ENTRY_SCORE = 'tblblogentry.ENTRY_SCORE';

	
	const ENTRY_STATUS = 'tblblogentry.ENTRY_STATUS';

	
	const ENTRY_CATEGORY = 'tblblogentry.ENTRY_CATEGORY';

	
	const ENTRY_LESSON = 'tblblogentry.ENTRY_LESSON';

	
	const ENTRY_TYPE = 'tblblogentry.ENTRY_TYPE';

	
	const ENTRY_BLOG = 'tblblogentry.ENTRY_BLOG';

	
	const ENTRY_THUMB = 'tblblogentry.ENTRY_THUMB';

	
	const ENTRY_THUMBNAIL = 'tblblogentry.ENTRY_THUMBNAIL';

	
	const ENTRY_LIKE = 'tblblogentry.ENTRY_LIKE';

	
	const ENTRY_LIKEINFO = 'tblblogentry.ENTRY_LIKEINFO';

	
	public static $instances = array();

	
	private static $mapBuilder = null;

	
	private static $fieldNames = array (
		BasePeer::TYPE_PHPNAME => array ('EntryId', 'EntryUser', 'EntryLink', 'EntryTitle', 'EntryContent', 'EntryCreatedate', 'EntryModifydate', 'EntryHit', 'EntryScore', 'EntryStatus', 'EntryCategory', 'EntryLesson', 'EntryType', 'EntryBlog', 'EntryThumb', 'EntryThumbnail', 'EntryLike', 'EntryLikeinfo', ),
		BasePeer::TYPE_STUDLYPHPNAME => array ('entryId', 'entryUser', 'entryLink', 'entryTitle', 'entryContent', 'entryCreatedate', 'entryModifydate', 'entryHit', 'entryScore', 'entryStatus', 'entryCategory', 'entryLesson', 'entryType', 'entryBlog', 'entryThumb', 'entryThumbnail', 'entryLike', 'entryLikeinfo', ),
		BasePeer::TYPE_COLNAME => array (self::ENTRY_ID, self::ENTRY_USER, self::ENTRY_LINK, self::ENTRY_TITLE, self::ENTRY_CONTENT, self::ENTRY_CREATEDATE, self::ENTRY_MODIFYDATE, self::ENTRY_HIT, self::ENTRY_SCORE, self::ENTRY_STATUS, self::ENTRY_CATEGORY, self::ENTRY_LESSON, self::ENTRY_TYPE, self::ENTRY_BLOG, self::ENTRY_THUMB, self::ENTRY_THUMBNAIL, self::ENTRY_LIKE, self::ENTRY_LIKEINFO, ),
		BasePeer::TYPE_FIELDNAME => array ('entry_id', 'entry_user', 'entry_link', 'entry_title', 'entry_content', 'entry_createdate', 'entry_modifydate', 'entry_hit', 'entry_score', 'entry_status', 'entry_category', 'entry_lesson', 'entry_type', 'entry_blog', 'entry_thumb', 'entry_thumbnail', 'entry_like', 'entry_likeinfo', ),
		BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
	);

	
	private static $fieldKeys = array (
		BasePeer::TYPE_PHPNAME => array ('EntryId' => 0, 'EntryUser' => 1, 'EntryLink' => 2, 'EntryTitle' => 3, 'EntryContent' => 4, 'EntryCreatedate' => 5, 'EntryModifydate' => 6, 'EntryHit' => 7, 'EntryScore' => 8, 'EntryStatus' => 9, 'EntryCategory' => 10, 'EntryLesson' => 11, 'EntryType' => 12, 'EntryBlog' => 13, 'EntryThumb' => 14, 'EntryThumbnail' => 15, 'EntryLike' => 16, 'EntryLikeinfo' => 17, ),
		BasePeer::TYPE_STUDLYPHPNAME => array ('entryId' => 0, 'entryUser' => 1, 'entryLink' => 2, 'entryTitle' => 3, 'entryContent' => 4, 'entryCreatedate' => 5, 'entryModifydate' => 6, 'entryHit' => 7, 'entryScore' => 8, 'entryStatus' => 9, 'entryCategory' => 10, 'entryLesson' => 11, 'entryType' => 12, 'entryBlog' => 13, 'entryThumb' => 14, 'entryThumbnail' => 15, 'entryLike' => 16, 'entryLikeinfo' => 17, ),
		BasePeer::TYPE_COLNAME => array (self::ENTRY_ID => 0, self::ENTRY_USER => 1, self::ENTRY_LINK => 2, self::ENTRY_TITLE => 3, self::ENTRY_CONTENT => 4, self::ENTRY_CREATEDATE => 5, self::ENTRY_MODIFYDATE => 6, self::ENTRY_HIT => 7, self::ENTRY_SCORE => 8, self::ENTRY_STATUS => 9, self::ENTRY_CATEGORY => 10, self::ENTRY_LESSON => 11, self::ENTRY_TYPE => 12, self::ENTRY_BLOG => 13, self::ENTRY_THUMB => 14, self::ENTRY_THUMBNAIL => 15, self::ENTRY_LIKE => 16, self::ENTRY_LIKEINFO => 17, ),
		BasePeer::TYPE_FIELDNAME => array ('entry_id' => 0, 'entry_user' => 1, 'entry_link' => 2, 'entry_title' => 3, 'entry_content' => 4, 'entry_createdate' => 5, 'entry_modifydate' => 6, 'entry_hit' => 7, 'entry_score' => 8, 'entry_status' => 9, 'entry_category' => 10, 'entry_lesson' => 11, 'entry_type' => 12, 'entry_blog' => 13, 'entry_thumb' => 14, 'entry_thumbnail' => 15, 'entry_like' => 16, 'entry_likeinfo' => 17, ),
		BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
	);

	
	public static function getMapBuilder()
	{
		if (self::$mapBuilder === null) {
			self::$mapBuilder = new TblblogentryMapBuilder();
		}
		return self::$mapBuilder;
	}
	
	static public function translateFieldName($name, $fromType, $toType)
	{
		$toNames = self::getFieldNames($toType);
		$key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null;
		if ($key === null) {
			throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true));
		}
		return $toNames[$key];
	}

	

	static public function getFieldNames($type = BasePeer::TYPE_PHPNAME)
	{
		if (!array_key_exists($type, self::$fieldNames)) {
			throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.');
		}
		return self::$fieldNames[$type];
	}

	
	public static function alias($alias, $column)
	{
		return str_replace(TblblogentryPeer::TABLE_NAME.'.', $alias.'.', $column);
	}

	
	public static function addSelectColumns(Criteria $criteria)
	{

		$criteria->addSelectColumn(TblblogentryPeer::ENTRY_ID);

		$criteria->addSelectColumn(TblblogentryPeer::ENTRY_USER);

		$criteria->addSelectColumn(TblblogentryPeer::ENTRY_LINK);

		$criteria->addSelectColumn(TblblogentryPeer::ENTRY_TITLE);

		$criteria->addSelectColumn(TblblogentryPeer::ENTRY_CREATEDATE);

		$criteria->addSelectColumn(TblblogentryPeer::ENTRY_MODIFYDATE);

		$criteria->addSelectColumn(TblblogentryPeer::ENTRY_HIT);

		$criteria->addSelectColumn(TblblogentryPeer::ENTRY_SCORE);

		$criteria->addSelectColumn(TblblogentryPeer::ENTRY_STATUS);

		$criteria->addSelectColumn(TblblogentryPeer::ENTRY_CATEGORY);

		$criteria->addSelectColumn(TblblogentryPeer::ENTRY_LESSON);

		$criteria->addSelectColumn(TblblogentryPeer::ENTRY_TYPE);

		$criteria->addSelectColumn(TblblogentryPeer::ENTRY_BLOG);

		$criteria->addSelectColumn(TblblogentryPeer::ENTRY_THUMB);

		$criteria->addSelectColumn(TblblogentryPeer::ENTRY_THUMBNAIL);

		$criteria->addSelectColumn(TblblogentryPeer::ENTRY_LIKE);

		$criteria->addSelectColumn(TblblogentryPeer::ENTRY_LIKEINFO);

	}

	
	public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null)
	{
				$criteria = clone $criteria;

								$criteria->setPrimaryTableName(TblblogentryPeer::TABLE_NAME);

		if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->setDistinct();
		}

		if (!$criteria->hasSelectClause()) {
			TblblogentryPeer::addSelectColumns($criteria);
		}

		$criteria->clearOrderByColumns(); 		$criteria->setDbName(self::DATABASE_NAME); 
		if ($con === null) {
			$con = Propel::getConnection(TblblogentryPeer::DATABASE_NAME, Propel::CONNECTION_READ);
		}
				$stmt = BasePeer::doCount($criteria, $con);

		if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
			$count = (int) $row[0];
		} else {
			$count = 0; 		}
		$stmt->closeCursor();
		return $count;
	}
	
	public static function doSelectOne(Criteria $criteria, PropelPDO $con = null)
	{
		$critcopy = clone $criteria;
		$critcopy->setLimit(1);
		$objects = TblblogentryPeer::doSelect($critcopy, $con);
		if ($objects) {
			return $objects[0];
		}
		return null;
	}
	
	public static function doSelect(Criteria $criteria, PropelPDO $con = null)
	{
		return TblblogentryPeer::populateObjects(TblblogentryPeer::doSelectStmt($criteria, $con));
	}
	
	public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null)
	{
		if ($con === null) {
			$con = Propel::getConnection(TblblogentryPeer::DATABASE_NAME, Propel::CONNECTION_READ);
		}

		if (!$criteria->hasSelectClause()) {
			$criteria = clone $criteria;
			TblblogentryPeer::addSelectColumns($criteria);
		}

				$criteria->setDbName(self::DATABASE_NAME);

				return BasePeer::doSelect($criteria, $con);
	}
	
	public static function addInstanceToPool(Tblblogentry $obj, $key = null)
	{
		if (Propel::isInstancePoolingEnabled()) {
			if ($key === null) {
				$key = (string) $obj->getEntryId();
			} 			self::$instances[$key] = $obj;
		}
	}

	
	public static function removeInstanceFromPool($value)
	{
		if (Propel::isInstancePoolingEnabled() && $value !== null) {
			if (is_object($value) && $value instanceof Tblblogentry) {
				$key = (string) $value->getEntryId();
			} elseif (is_scalar($value)) {
								$key = (string) $value;
			} else {
				$e = new PropelException("Invalid value passed to removeInstanceFromPool().  Expected primary key or Tblblogentry object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true)));
				throw $e;
			}

			unset(self::$instances[$key]);
		}
	} 
	
	public static function getInstanceFromPool($key)
	{
		if (Propel::isInstancePoolingEnabled()) {
			if (isset(self::$instances[$key])) {
				return self::$instances[$key];
			}
		}
		return null; 	}
	
	
	public static function clearInstancePool()
	{
		self::$instances = array();
	}
	
	
	public static function getPrimaryKeyHashFromRow($row, $startcol = 0)
	{
				if ($row[$startcol + 0] === null) {
			return null;
		}
		return (string) $row[$startcol + 0];
	}

	
	public static function populateObjects(PDOStatement $stmt)
	{
		$results = array();
	
				$cls = TblblogentryPeer::getOMClass();
		$cls = substr('.'.$cls, strrpos('.'.$cls, '.') + 1);
				while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
			$key = TblblogentryPeer::getPrimaryKeyHashFromRow($row, 0);
			if (null !== ($obj = TblblogentryPeer::getInstanceFromPool($key))) {
																$results[] = $obj;
			} else {
		
				$obj = new $cls();
				$obj->hydrate($row);
				$results[] = $obj;
				TblblogentryPeer::addInstanceToPool($obj, $key);
			} 		}
		$stmt->closeCursor();
		return $results;
	}

	
	public static function doCountJoinTblpresentation(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
	{
				$criteria = clone $criteria;

								$criteria->setPrimaryTableName(TblblogentryPeer::TABLE_NAME);

		if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->setDistinct();
		}

		if (!$criteria->hasSelectClause()) {
			TblblogentryPeer::addSelectColumns($criteria);
		}
		
		$criteria->clearOrderByColumns(); 		
				$criteria->setDbName(self::DATABASE_NAME);

		if ($con === null) {
			$con = Propel::getConnection(TblblogentryPeer::DATABASE_NAME, Propel::CONNECTION_READ);
		}

		$criteria->addJoin(array(TblblogentryPeer::ENTRY_LINK,), array(TblpresentationPeer::PR_ID,), $join_behavior);
		$stmt = BasePeer::doCount($criteria, $con);

		if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
			$count = (int) $row[0];
		} else {
			$count = 0; 		}
		$stmt->closeCursor();
		return $count;
	}


	
	public static function doCountJoinTbldocument(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
	{
				$criteria = clone $criteria;

								$criteria->setPrimaryTableName(TblblogentryPeer::TABLE_NAME);

		if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->setDistinct();
		}

		if (!$criteria->hasSelectClause()) {
			TblblogentryPeer::addSelectColumns($criteria);
		}
		
		$criteria->clearOrderByColumns(); 		
				$criteria->setDbName(self::DATABASE_NAME);

		if ($con === null) {
			$con = Propel::getConnection(TblblogentryPeer::DATABASE_NAME, Propel::CONNECTION_READ);
		}

		$criteria->addJoin(array(TblblogentryPeer::ENTRY_LINK,), array(TbldocumentPeer::DOC_ID,), $join_behavior);
		$stmt = BasePeer::doCount($criteria, $con);

		if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
			$count = (int) $row[0];
		} else {
			$count = 0; 		}
		$stmt->closeCursor();
		return $count;
	}


	
	public static function doCountJoinTblblogcategory(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
	{
				$criteria = clone $criteria;

								$criteria->setPrimaryTableName(TblblogentryPeer::TABLE_NAME);

		if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->setDistinct();
		}

		if (!$criteria->hasSelectClause()) {
			TblblogentryPeer::addSelectColumns($criteria);
		}
		
		$criteria->clearOrderByColumns(); 		
				$criteria->setDbName(self::DATABASE_NAME);

		if ($con === null) {
			$con = Propel::getConnection(TblblogentryPeer::DATABASE_NAME, Propel::CONNECTION_READ);
		}

		$criteria->addJoin(array(TblblogentryPeer::ENTRY_CATEGORY,), array(TblblogcategoryPeer::CAT_ID,), $join_behavior);
		$stmt = BasePeer::doCount($criteria, $con);

		if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
			$count = (int) $row[0];
		} else {
			$count = 0; 		}
		$stmt->closeCursor();
		return $count;
	}


	
	public static function doCountJoinTblblog(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
	{
				$criteria = clone $criteria;

								$criteria->setPrimaryTableName(TblblogentryPeer::TABLE_NAME);

		if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->setDistinct();
		}

		if (!$criteria->hasSelectClause()) {
			TblblogentryPeer::addSelectColumns($criteria);
		}
		
		$criteria->clearOrderByColumns(); 		
				$criteria->setDbName(self::DATABASE_NAME);

		if ($con === null) {
			$con = Propel::getConnection(TblblogentryPeer::DATABASE_NAME, Propel::CONNECTION_READ);
		}

		$criteria->addJoin(array(TblblogentryPeer::ENTRY_BLOG,), array(TblblogPeer::BL_ID,), $join_behavior);
		$stmt = BasePeer::doCount($criteria, $con);

		if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
			$count = (int) $row[0];
		} else {
			$count = 0; 		}
		$stmt->closeCursor();
		return $count;
	}


	
	public static function doCountJoinTbluser(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
	{
				$criteria = clone $criteria;

								$criteria->setPrimaryTableName(TblblogentryPeer::TABLE_NAME);

		if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->setDistinct();
		}

		if (!$criteria->hasSelectClause()) {
			TblblogentryPeer::addSelectColumns($criteria);
		}
		
		$criteria->clearOrderByColumns(); 		
				$criteria->setDbName(self::DATABASE_NAME);

		if ($con === null) {
			$con = Propel::getConnection(TblblogentryPeer::DATABASE_NAME, Propel::CONNECTION_READ);
		}

		$criteria->addJoin(array(TblblogentryPeer::ENTRY_USER,), array(TbluserPeer::US_ID,), $join_behavior);
		$stmt = BasePeer::doCount($criteria, $con);

		if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
			$count = (int) $row[0];
		} else {
			$count = 0; 		}
		$stmt->closeCursor();
		return $count;
	}


	
	public static function doSelectJoinTblpresentation(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN)
	{
		$c = clone $c;

				if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		TblblogentryPeer::addSelectColumns($c);
		$startcol = (TblblogentryPeer::NUM_COLUMNS - TblblogentryPeer::NUM_LAZY_LOAD_COLUMNS);
		TblpresentationPeer::addSelectColumns($c);

		$c->addJoin(array(TblblogentryPeer::ENTRY_LINK,), array(TblpresentationPeer::PR_ID,), $join_behavior);
		$stmt = BasePeer::doSelect($c, $con);
		$results = array();

		while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
			$key1 = TblblogentryPeer::getPrimaryKeyHashFromRow($row, 0);
			if (null !== ($obj1 = TblblogentryPeer::getInstanceFromPool($key1))) {
															} else {

				$omClass = TblblogentryPeer::getOMClass();

				$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
				$obj1 = new $cls();
				$obj1->hydrate($row);
				TblblogentryPeer::addInstanceToPool($obj1, $key1);
			} 
			$key2 = TblpresentationPeer::getPrimaryKeyHashFromRow($row, $startcol);
			if ($key2 !== null) {
				$obj2 = TblpresentationPeer::getInstanceFromPool($key2);
				if (!$obj2) {

					$omClass = TblpresentationPeer::getOMClass();

					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj2 = new $cls();
					$obj2->hydrate($row, $startcol);
					TblpresentationPeer::addInstanceToPool($obj2, $key2);
				} 
								$obj2->addTblblogentry($obj1);

			} 
			$results[] = $obj1;
		}
		$stmt->closeCursor();
		return $results;
	}


	
	public static function doSelectJoinTbldocument(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN)
	{
		$c = clone $c;

				if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		TblblogentryPeer::addSelectColumns($c);
		$startcol = (TblblogentryPeer::NUM_COLUMNS - TblblogentryPeer::NUM_LAZY_LOAD_COLUMNS);
		TbldocumentPeer::addSelectColumns($c);

		$c->addJoin(array(TblblogentryPeer::ENTRY_LINK,), array(TbldocumentPeer::DOC_ID,), $join_behavior);
		$stmt = BasePeer::doSelect($c, $con);
		$results = array();

		while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
			$key1 = TblblogentryPeer::getPrimaryKeyHashFromRow($row, 0);
			if (null !== ($obj1 = TblblogentryPeer::getInstanceFromPool($key1))) {
															} else {

				$omClass = TblblogentryPeer::getOMClass();

				$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
				$obj1 = new $cls();
				$obj1->hydrate($row);
				TblblogentryPeer::addInstanceToPool($obj1, $key1);
			} 
			$key2 = TbldocumentPeer::getPrimaryKeyHashFromRow($row, $startcol);
			if ($key2 !== null) {
				$obj2 = TbldocumentPeer::getInstanceFromPool($key2);
				if (!$obj2) {

					$omClass = TbldocumentPeer::getOMClass();

					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj2 = new $cls();
					$obj2->hydrate($row, $startcol);
					TbldocumentPeer::addInstanceToPool($obj2, $key2);
				} 
								$obj2->addTblblogentry($obj1);

			} 
			$results[] = $obj1;
		}
		$stmt->closeCursor();
		return $results;
	}


	
	public static function doSelectJoinTblblogcategory(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN)
	{
		$c = clone $c;

				if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		TblblogentryPeer::addSelectColumns($c);
		$startcol = (TblblogentryPeer::NUM_COLUMNS - TblblogentryPeer::NUM_LAZY_LOAD_COLUMNS);
		TblblogcategoryPeer::addSelectColumns($c);

		$c->addJoin(array(TblblogentryPeer::ENTRY_CATEGORY,), array(TblblogcategoryPeer::CAT_ID,), $join_behavior);
		$stmt = BasePeer::doSelect($c, $con);
		$results = array();

		while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
			$key1 = TblblogentryPeer::getPrimaryKeyHashFromRow($row, 0);
			if (null !== ($obj1 = TblblogentryPeer::getInstanceFromPool($key1))) {
															} else {

				$omClass = TblblogentryPeer::getOMClass();

				$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
				$obj1 = new $cls();
				$obj1->hydrate($row);
				TblblogentryPeer::addInstanceToPool($obj1, $key1);
			} 
			$key2 = TblblogcategoryPeer::getPrimaryKeyHashFromRow($row, $startcol);
			if ($key2 !== null) {
				$obj2 = TblblogcategoryPeer::getInstanceFromPool($key2);
				if (!$obj2) {

					$omClass = TblblogcategoryPeer::getOMClass();

					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj2 = new $cls();
					$obj2->hydrate($row, $startcol);
					TblblogcategoryPeer::addInstanceToPool($obj2, $key2);
				} 
								$obj2->addTblblogentry($obj1);

			} 
			$results[] = $obj1;
		}
		$stmt->closeCursor();
		return $results;
	}


	
	public static function doSelectJoinTblblog(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN)
	{
		$c = clone $c;

				if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		TblblogentryPeer::addSelectColumns($c);
		$startcol = (TblblogentryPeer::NUM_COLUMNS - TblblogentryPeer::NUM_LAZY_LOAD_COLUMNS);
		TblblogPeer::addSelectColumns($c);

		$c->addJoin(array(TblblogentryPeer::ENTRY_BLOG,), array(TblblogPeer::BL_ID,), $join_behavior);
		$stmt = BasePeer::doSelect($c, $con);
		$results = array();

		while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
			$key1 = TblblogentryPeer::getPrimaryKeyHashFromRow($row, 0);
			if (null !== ($obj1 = TblblogentryPeer::getInstanceFromPool($key1))) {
															} else {

				$omClass = TblblogentryPeer::getOMClass();

				$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
				$obj1 = new $cls();
				$obj1->hydrate($row);
				TblblogentryPeer::addInstanceToPool($obj1, $key1);
			} 
			$key2 = TblblogPeer::getPrimaryKeyHashFromRow($row, $startcol);
			if ($key2 !== null) {
				$obj2 = TblblogPeer::getInstanceFromPool($key2);
				if (!$obj2) {

					$omClass = TblblogPeer::getOMClass();

					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj2 = new $cls();
					$obj2->hydrate($row, $startcol);
					TblblogPeer::addInstanceToPool($obj2, $key2);
				} 
								$obj2->addTblblogentry($obj1);

			} 
			$results[] = $obj1;
		}
		$stmt->closeCursor();
		return $results;
	}


	
	public static function doSelectJoinTbluser(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN)
	{
		$c = clone $c;

				if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		TblblogentryPeer::addSelectColumns($c);
		$startcol = (TblblogentryPeer::NUM_COLUMNS - TblblogentryPeer::NUM_LAZY_LOAD_COLUMNS);
		TbluserPeer::addSelectColumns($c);

		$c->addJoin(array(TblblogentryPeer::ENTRY_USER,), array(TbluserPeer::US_ID,), $join_behavior);
		$stmt = BasePeer::doSelect($c, $con);
		$results = array();

		while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
			$key1 = TblblogentryPeer::getPrimaryKeyHashFromRow($row, 0);
			if (null !== ($obj1 = TblblogentryPeer::getInstanceFromPool($key1))) {
															} else {

				$omClass = TblblogentryPeer::getOMClass();

				$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
				$obj1 = new $cls();
				$obj1->hydrate($row);
				TblblogentryPeer::addInstanceToPool($obj1, $key1);
			} 
			$key2 = TbluserPeer::getPrimaryKeyHashFromRow($row, $startcol);
			if ($key2 !== null) {
				$obj2 = TbluserPeer::getInstanceFromPool($key2);
				if (!$obj2) {

					$omClass = TbluserPeer::getOMClass();

					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj2 = new $cls();
					$obj2->hydrate($row, $startcol);
					TbluserPeer::addInstanceToPool($obj2, $key2);
				} 
								$obj2->addTblblogentry($obj1);

			} 
			$results[] = $obj1;
		}
		$stmt->closeCursor();
		return $results;
	}


	
	public static function doCountJoinAll(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
	{
				$criteria = clone $criteria;

								$criteria->setPrimaryTableName(TblblogentryPeer::TABLE_NAME);

		if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->setDistinct();
		}

		if (!$criteria->hasSelectClause()) {
			TblblogentryPeer::addSelectColumns($criteria);
		}
		
		$criteria->clearOrderByColumns(); 		
				$criteria->setDbName(self::DATABASE_NAME);

		if ($con === null) {
			$con = Propel::getConnection(TblblogentryPeer::DATABASE_NAME, Propel::CONNECTION_READ);
		}

		$criteria->addJoin(array(TblblogentryPeer::ENTRY_LINK,), array(TblpresentationPeer::PR_ID,), $join_behavior);
		$criteria->addJoin(array(TblblogentryPeer::ENTRY_LINK,), array(TbldocumentPeer::DOC_ID,), $join_behavior);
		$criteria->addJoin(array(TblblogentryPeer::ENTRY_CATEGORY,), array(TblblogcategoryPeer::CAT_ID,), $join_behavior);
		$criteria->addJoin(array(TblblogentryPeer::ENTRY_BLOG,), array(TblblogPeer::BL_ID,), $join_behavior);
		$criteria->addJoin(array(TblblogentryPeer::ENTRY_USER,), array(TbluserPeer::US_ID,), $join_behavior);
		$stmt = BasePeer::doCount($criteria, $con);

		if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
			$count = (int) $row[0];
		} else {
			$count = 0; 		}
		$stmt->closeCursor();
		return $count;
	}

	
	public static function doSelectJoinAll(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN)
	{
		$c = clone $c;

				if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		TblblogentryPeer::addSelectColumns($c);
		$startcol2 = (TblblogentryPeer::NUM_COLUMNS - TblblogentryPeer::NUM_LAZY_LOAD_COLUMNS);

		TblpresentationPeer::addSelectColumns($c);
		$startcol3 = $startcol2 + (TblpresentationPeer::NUM_COLUMNS - TblpresentationPeer::NUM_LAZY_LOAD_COLUMNS);

		TbldocumentPeer::addSelectColumns($c);
		$startcol4 = $startcol3 + (TbldocumentPeer::NUM_COLUMNS - TbldocumentPeer::NUM_LAZY_LOAD_COLUMNS);

		TblblogcategoryPeer::addSelectColumns($c);
		$startcol5 = $startcol4 + (TblblogcategoryPeer::NUM_COLUMNS - TblblogcategoryPeer::NUM_LAZY_LOAD_COLUMNS);

		TblblogPeer::addSelectColumns($c);
		$startcol6 = $startcol5 + (TblblogPeer::NUM_COLUMNS - TblblogPeer::NUM_LAZY_LOAD_COLUMNS);

		TbluserPeer::addSelectColumns($c);
		$startcol7 = $startcol6 + (TbluserPeer::NUM_COLUMNS - TbluserPeer::NUM_LAZY_LOAD_COLUMNS);

		$c->addJoin(array(TblblogentryPeer::ENTRY_LINK,), array(TblpresentationPeer::PR_ID,), $join_behavior);
		$c->addJoin(array(TblblogentryPeer::ENTRY_LINK,), array(TbldocumentPeer::DOC_ID,), $join_behavior);
		$c->addJoin(array(TblblogentryPeer::ENTRY_CATEGORY,), array(TblblogcategoryPeer::CAT_ID,), $join_behavior);
		$c->addJoin(array(TblblogentryPeer::ENTRY_BLOG,), array(TblblogPeer::BL_ID,), $join_behavior);
		$c->addJoin(array(TblblogentryPeer::ENTRY_USER,), array(TbluserPeer::US_ID,), $join_behavior);
		$stmt = BasePeer::doSelect($c, $con);
		$results = array();

		while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
			$key1 = TblblogentryPeer::getPrimaryKeyHashFromRow($row, 0);
			if (null !== ($obj1 = TblblogentryPeer::getInstanceFromPool($key1))) {
															} else {
				$omClass = TblblogentryPeer::getOMClass();

				$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
				$obj1 = new $cls();
				$obj1->hydrate($row);
				TblblogentryPeer::addInstanceToPool($obj1, $key1);
			} 
			
			$key2 = TblpresentationPeer::getPrimaryKeyHashFromRow($row, $startcol2);
			if ($key2 !== null) {
				$obj2 = TblpresentationPeer::getInstanceFromPool($key2);
				if (!$obj2) {

					$omClass = TblpresentationPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj2 = new $cls();
					$obj2->hydrate($row, $startcol2);
					TblpresentationPeer::addInstanceToPool($obj2, $key2);
				} 
								$obj2->addTblblogentry($obj1);
			} 
			
			$key3 = TbldocumentPeer::getPrimaryKeyHashFromRow($row, $startcol3);
			if ($key3 !== null) {
				$obj3 = TbldocumentPeer::getInstanceFromPool($key3);
				if (!$obj3) {

					$omClass = TbldocumentPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj3 = new $cls();
					$obj3->hydrate($row, $startcol3);
					TbldocumentPeer::addInstanceToPool($obj3, $key3);
				} 
								$obj3->addTblblogentry($obj1);
			} 
			
			$key4 = TblblogcategoryPeer::getPrimaryKeyHashFromRow($row, $startcol4);
			if ($key4 !== null) {
				$obj4 = TblblogcategoryPeer::getInstanceFromPool($key4);
				if (!$obj4) {

					$omClass = TblblogcategoryPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj4 = new $cls();
					$obj4->hydrate($row, $startcol4);
					TblblogcategoryPeer::addInstanceToPool($obj4, $key4);
				} 
								$obj4->addTblblogentry($obj1);
			} 
			
			$key5 = TblblogPeer::getPrimaryKeyHashFromRow($row, $startcol5);
			if ($key5 !== null) {
				$obj5 = TblblogPeer::getInstanceFromPool($key5);
				if (!$obj5) {

					$omClass = TblblogPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj5 = new $cls();
					$obj5->hydrate($row, $startcol5);
					TblblogPeer::addInstanceToPool($obj5, $key5);
				} 
								$obj5->addTblblogentry($obj1);
			} 
			
			$key6 = TbluserPeer::getPrimaryKeyHashFromRow($row, $startcol6);
			if ($key6 !== null) {
				$obj6 = TbluserPeer::getInstanceFromPool($key6);
				if (!$obj6) {

					$omClass = TbluserPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj6 = new $cls();
					$obj6->hydrate($row, $startcol6);
					TbluserPeer::addInstanceToPool($obj6, $key6);
				} 
								$obj6->addTblblogentry($obj1);
			} 
			$results[] = $obj1;
		}
		$stmt->closeCursor();
		return $results;
	}


	
	public static function doCountJoinAllExceptTblpresentation(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
	{
				$criteria = clone $criteria;

								$criteria->setPrimaryTableName(TblblogentryPeer::TABLE_NAME);
		
		if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->setDistinct();
		}

		if (!$criteria->hasSelectClause()) {
			TblblogentryPeer::addSelectColumns($criteria);
		}
		
		$criteria->clearOrderByColumns(); 		
				$criteria->setDbName(self::DATABASE_NAME);

		if ($con === null) {
			$con = Propel::getConnection(TblblogentryPeer::DATABASE_NAME, Propel::CONNECTION_READ);
		}
	
				$criteria->addJoin(array(TblblogentryPeer::ENTRY_LINK,), array(TbldocumentPeer::DOC_ID,), $join_behavior);
				$criteria->addJoin(array(TblblogentryPeer::ENTRY_CATEGORY,), array(TblblogcategoryPeer::CAT_ID,), $join_behavior);
				$criteria->addJoin(array(TblblogentryPeer::ENTRY_BLOG,), array(TblblogPeer::BL_ID,), $join_behavior);
				$criteria->addJoin(array(TblblogentryPeer::ENTRY_USER,), array(TbluserPeer::US_ID,), $join_behavior);
		$stmt = BasePeer::doCount($criteria, $con);

		if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
			$count = (int) $row[0];
		} else {
			$count = 0; 		}
		$stmt->closeCursor();
		return $count;
	}


	
	public static function doCountJoinAllExceptTbldocument(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
	{
				$criteria = clone $criteria;

								$criteria->setPrimaryTableName(TblblogentryPeer::TABLE_NAME);
		
		if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->setDistinct();
		}

		if (!$criteria->hasSelectClause()) {
			TblblogentryPeer::addSelectColumns($criteria);
		}
		
		$criteria->clearOrderByColumns(); 		
				$criteria->setDbName(self::DATABASE_NAME);

		if ($con === null) {
			$con = Propel::getConnection(TblblogentryPeer::DATABASE_NAME, Propel::CONNECTION_READ);
		}
	
				$criteria->addJoin(array(TblblogentryPeer::ENTRY_LINK,), array(TblpresentationPeer::PR_ID,), $join_behavior);
				$criteria->addJoin(array(TblblogentryPeer::ENTRY_CATEGORY,), array(TblblogcategoryPeer::CAT_ID,), $join_behavior);
				$criteria->addJoin(array(TblblogentryPeer::ENTRY_BLOG,), array(TblblogPeer::BL_ID,), $join_behavior);
				$criteria->addJoin(array(TblblogentryPeer::ENTRY_USER,), array(TbluserPeer::US_ID,), $join_behavior);
		$stmt = BasePeer::doCount($criteria, $con);

		if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
			$count = (int) $row[0];
		} else {
			$count = 0; 		}
		$stmt->closeCursor();
		return $count;
	}


	
	public static function doCountJoinAllExceptTblblogcategory(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
	{
				$criteria = clone $criteria;

								$criteria->setPrimaryTableName(TblblogentryPeer::TABLE_NAME);
		
		if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->setDistinct();
		}

		if (!$criteria->hasSelectClause()) {
			TblblogentryPeer::addSelectColumns($criteria);
		}
		
		$criteria->clearOrderByColumns(); 		
				$criteria->setDbName(self::DATABASE_NAME);

		if ($con === null) {
			$con = Propel::getConnection(TblblogentryPeer::DATABASE_NAME, Propel::CONNECTION_READ);
		}
	
				$criteria->addJoin(array(TblblogentryPeer::ENTRY_LINK,), array(TblpresentationPeer::PR_ID,), $join_behavior);
				$criteria->addJoin(array(TblblogentryPeer::ENTRY_LINK,), array(TbldocumentPeer::DOC_ID,), $join_behavior);
				$criteria->addJoin(array(TblblogentryPeer::ENTRY_BLOG,), array(TblblogPeer::BL_ID,), $join_behavior);
				$criteria->addJoin(array(TblblogentryPeer::ENTRY_USER,), array(TbluserPeer::US_ID,), $join_behavior);
		$stmt = BasePeer::doCount($criteria, $con);

		if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
			$count = (int) $row[0];
		} else {
			$count = 0; 		}
		$stmt->closeCursor();
		return $count;
	}


	
	public static function doCountJoinAllExceptTblblog(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
	{
				$criteria = clone $criteria;

								$criteria->setPrimaryTableName(TblblogentryPeer::TABLE_NAME);
		
		if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->setDistinct();
		}

		if (!$criteria->hasSelectClause()) {
			TblblogentryPeer::addSelectColumns($criteria);
		}
		
		$criteria->clearOrderByColumns(); 		
				$criteria->setDbName(self::DATABASE_NAME);

		if ($con === null) {
			$con = Propel::getConnection(TblblogentryPeer::DATABASE_NAME, Propel::CONNECTION_READ);
		}
	
				$criteria->addJoin(array(TblblogentryPeer::ENTRY_LINK,), array(TblpresentationPeer::PR_ID,), $join_behavior);
				$criteria->addJoin(array(TblblogentryPeer::ENTRY_LINK,), array(TbldocumentPeer::DOC_ID,), $join_behavior);
				$criteria->addJoin(array(TblblogentryPeer::ENTRY_CATEGORY,), array(TblblogcategoryPeer::CAT_ID,), $join_behavior);
				$criteria->addJoin(array(TblblogentryPeer::ENTRY_USER,), array(TbluserPeer::US_ID,), $join_behavior);
		$stmt = BasePeer::doCount($criteria, $con);

		if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
			$count = (int) $row[0];
		} else {
			$count = 0; 		}
		$stmt->closeCursor();
		return $count;
	}


	
	public static function doCountJoinAllExceptTbluser(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
	{
				$criteria = clone $criteria;

								$criteria->setPrimaryTableName(TblblogentryPeer::TABLE_NAME);
		
		if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->setDistinct();
		}

		if (!$criteria->hasSelectClause()) {
			TblblogentryPeer::addSelectColumns($criteria);
		}
		
		$criteria->clearOrderByColumns(); 		
				$criteria->setDbName(self::DATABASE_NAME);

		if ($con === null) {
			$con = Propel::getConnection(TblblogentryPeer::DATABASE_NAME, Propel::CONNECTION_READ);
		}
	
				$criteria->addJoin(array(TblblogentryPeer::ENTRY_LINK,), array(TblpresentationPeer::PR_ID,), $join_behavior);
				$criteria->addJoin(array(TblblogentryPeer::ENTRY_LINK,), array(TbldocumentPeer::DOC_ID,), $join_behavior);
				$criteria->addJoin(array(TblblogentryPeer::ENTRY_CATEGORY,), array(TblblogcategoryPeer::CAT_ID,), $join_behavior);
				$criteria->addJoin(array(TblblogentryPeer::ENTRY_BLOG,), array(TblblogPeer::BL_ID,), $join_behavior);
		$stmt = BasePeer::doCount($criteria, $con);

		if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
			$count = (int) $row[0];
		} else {
			$count = 0; 		}
		$stmt->closeCursor();
		return $count;
	}


	
	public static function doSelectJoinAllExceptTblpresentation(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN)
	{
		$c = clone $c;

								if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		TblblogentryPeer::addSelectColumns($c);
		$startcol2 = (TblblogentryPeer::NUM_COLUMNS - TblblogentryPeer::NUM_LAZY_LOAD_COLUMNS);

		TbldocumentPeer::addSelectColumns($c);
		$startcol3 = $startcol2 + (TbldocumentPeer::NUM_COLUMNS - TbldocumentPeer::NUM_LAZY_LOAD_COLUMNS);

		TblblogcategoryPeer::addSelectColumns($c);
		$startcol4 = $startcol3 + (TblblogcategoryPeer::NUM_COLUMNS - TblblogcategoryPeer::NUM_LAZY_LOAD_COLUMNS);

		TblblogPeer::addSelectColumns($c);
		$startcol5 = $startcol4 + (TblblogPeer::NUM_COLUMNS - TblblogPeer::NUM_LAZY_LOAD_COLUMNS);

		TbluserPeer::addSelectColumns($c);
		$startcol6 = $startcol5 + (TbluserPeer::NUM_COLUMNS - TbluserPeer::NUM_LAZY_LOAD_COLUMNS);

				$c->addJoin(array(TblblogentryPeer::ENTRY_LINK,), array(TbldocumentPeer::DOC_ID,), $join_behavior);
				$c->addJoin(array(TblblogentryPeer::ENTRY_CATEGORY,), array(TblblogcategoryPeer::CAT_ID,), $join_behavior);
				$c->addJoin(array(TblblogentryPeer::ENTRY_BLOG,), array(TblblogPeer::BL_ID,), $join_behavior);
				$c->addJoin(array(TblblogentryPeer::ENTRY_USER,), array(TbluserPeer::US_ID,), $join_behavior);

		$stmt = BasePeer::doSelect($c, $con);
		$results = array();

		while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
			$key1 = TblblogentryPeer::getPrimaryKeyHashFromRow($row, 0);
			if (null !== ($obj1 = TblblogentryPeer::getInstanceFromPool($key1))) {
															} else {
				$omClass = TblblogentryPeer::getOMClass();

				$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
				$obj1 = new $cls();
				$obj1->hydrate($row);
				TblblogentryPeer::addInstanceToPool($obj1, $key1);
			} 
				
				$key2 = TbldocumentPeer::getPrimaryKeyHashFromRow($row, $startcol2);
				if ($key2 !== null) {
					$obj2 = TbldocumentPeer::getInstanceFromPool($key2);
					if (!$obj2) {
	
						$omClass = TbldocumentPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj2 = new $cls();
					$obj2->hydrate($row, $startcol2);
					TbldocumentPeer::addInstanceToPool($obj2, $key2);
				} 
								$obj2->addTblblogentry($obj1);

			} 
				
				$key3 = TblblogcategoryPeer::getPrimaryKeyHashFromRow($row, $startcol3);
				if ($key3 !== null) {
					$obj3 = TblblogcategoryPeer::getInstanceFromPool($key3);
					if (!$obj3) {
	
						$omClass = TblblogcategoryPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj3 = new $cls();
					$obj3->hydrate($row, $startcol3);
					TblblogcategoryPeer::addInstanceToPool($obj3, $key3);
				} 
								$obj3->addTblblogentry($obj1);

			} 
				
				$key4 = TblblogPeer::getPrimaryKeyHashFromRow($row, $startcol4);
				if ($key4 !== null) {
					$obj4 = TblblogPeer::getInstanceFromPool($key4);
					if (!$obj4) {
	
						$omClass = TblblogPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj4 = new $cls();
					$obj4->hydrate($row, $startcol4);
					TblblogPeer::addInstanceToPool($obj4, $key4);
				} 
								$obj4->addTblblogentry($obj1);

			} 
				
				$key5 = TbluserPeer::getPrimaryKeyHashFromRow($row, $startcol5);
				if ($key5 !== null) {
					$obj5 = TbluserPeer::getInstanceFromPool($key5);
					if (!$obj5) {
	
						$omClass = TbluserPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj5 = new $cls();
					$obj5->hydrate($row, $startcol5);
					TbluserPeer::addInstanceToPool($obj5, $key5);
				} 
								$obj5->addTblblogentry($obj1);

			} 
			$results[] = $obj1;
		}
		$stmt->closeCursor();
		return $results;
	}


	
	public static function doSelectJoinAllExceptTbldocument(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN)
	{
		$c = clone $c;

								if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		TblblogentryPeer::addSelectColumns($c);
		$startcol2 = (TblblogentryPeer::NUM_COLUMNS - TblblogentryPeer::NUM_LAZY_LOAD_COLUMNS);

		TblpresentationPeer::addSelectColumns($c);
		$startcol3 = $startcol2 + (TblpresentationPeer::NUM_COLUMNS - TblpresentationPeer::NUM_LAZY_LOAD_COLUMNS);

		TblblogcategoryPeer::addSelectColumns($c);
		$startcol4 = $startcol3 + (TblblogcategoryPeer::NUM_COLUMNS - TblblogcategoryPeer::NUM_LAZY_LOAD_COLUMNS);

		TblblogPeer::addSelectColumns($c);
		$startcol5 = $startcol4 + (TblblogPeer::NUM_COLUMNS - TblblogPeer::NUM_LAZY_LOAD_COLUMNS);

		TbluserPeer::addSelectColumns($c);
		$startcol6 = $startcol5 + (TbluserPeer::NUM_COLUMNS - TbluserPeer::NUM_LAZY_LOAD_COLUMNS);

				$c->addJoin(array(TblblogentryPeer::ENTRY_LINK,), array(TblpresentationPeer::PR_ID,), $join_behavior);
				$c->addJoin(array(TblblogentryPeer::ENTRY_CATEGORY,), array(TblblogcategoryPeer::CAT_ID,), $join_behavior);
				$c->addJoin(array(TblblogentryPeer::ENTRY_BLOG,), array(TblblogPeer::BL_ID,), $join_behavior);
				$c->addJoin(array(TblblogentryPeer::ENTRY_USER,), array(TbluserPeer::US_ID,), $join_behavior);

		$stmt = BasePeer::doSelect($c, $con);
		$results = array();

		while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
			$key1 = TblblogentryPeer::getPrimaryKeyHashFromRow($row, 0);
			if (null !== ($obj1 = TblblogentryPeer::getInstanceFromPool($key1))) {
															} else {
				$omClass = TblblogentryPeer::getOMClass();

				$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
				$obj1 = new $cls();
				$obj1->hydrate($row);
				TblblogentryPeer::addInstanceToPool($obj1, $key1);
			} 
				
				$key2 = TblpresentationPeer::getPrimaryKeyHashFromRow($row, $startcol2);
				if ($key2 !== null) {
					$obj2 = TblpresentationPeer::getInstanceFromPool($key2);
					if (!$obj2) {
	
						$omClass = TblpresentationPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj2 = new $cls();
					$obj2->hydrate($row, $startcol2);
					TblpresentationPeer::addInstanceToPool($obj2, $key2);
				} 
								$obj2->addTblblogentry($obj1);

			} 
				
				$key3 = TblblogcategoryPeer::getPrimaryKeyHashFromRow($row, $startcol3);
				if ($key3 !== null) {
					$obj3 = TblblogcategoryPeer::getInstanceFromPool($key3);
					if (!$obj3) {
	
						$omClass = TblblogcategoryPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj3 = new $cls();
					$obj3->hydrate($row, $startcol3);
					TblblogcategoryPeer::addInstanceToPool($obj3, $key3);
				} 
								$obj3->addTblblogentry($obj1);

			} 
				
				$key4 = TblblogPeer::getPrimaryKeyHashFromRow($row, $startcol4);
				if ($key4 !== null) {
					$obj4 = TblblogPeer::getInstanceFromPool($key4);
					if (!$obj4) {
	
						$omClass = TblblogPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj4 = new $cls();
					$obj4->hydrate($row, $startcol4);
					TblblogPeer::addInstanceToPool($obj4, $key4);
				} 
								$obj4->addTblblogentry($obj1);

			} 
				
				$key5 = TbluserPeer::getPrimaryKeyHashFromRow($row, $startcol5);
				if ($key5 !== null) {
					$obj5 = TbluserPeer::getInstanceFromPool($key5);
					if (!$obj5) {
	
						$omClass = TbluserPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj5 = new $cls();
					$obj5->hydrate($row, $startcol5);
					TbluserPeer::addInstanceToPool($obj5, $key5);
				} 
								$obj5->addTblblogentry($obj1);

			} 
			$results[] = $obj1;
		}
		$stmt->closeCursor();
		return $results;
	}


	
	public static function doSelectJoinAllExceptTblblogcategory(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN)
	{
		$c = clone $c;

								if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		TblblogentryPeer::addSelectColumns($c);
		$startcol2 = (TblblogentryPeer::NUM_COLUMNS - TblblogentryPeer::NUM_LAZY_LOAD_COLUMNS);

		TblpresentationPeer::addSelectColumns($c);
		$startcol3 = $startcol2 + (TblpresentationPeer::NUM_COLUMNS - TblpresentationPeer::NUM_LAZY_LOAD_COLUMNS);

		TbldocumentPeer::addSelectColumns($c);
		$startcol4 = $startcol3 + (TbldocumentPeer::NUM_COLUMNS - TbldocumentPeer::NUM_LAZY_LOAD_COLUMNS);

		TblblogPeer::addSelectColumns($c);
		$startcol5 = $startcol4 + (TblblogPeer::NUM_COLUMNS - TblblogPeer::NUM_LAZY_LOAD_COLUMNS);

		TbluserPeer::addSelectColumns($c);
		$startcol6 = $startcol5 + (TbluserPeer::NUM_COLUMNS - TbluserPeer::NUM_LAZY_LOAD_COLUMNS);

				$c->addJoin(array(TblblogentryPeer::ENTRY_LINK,), array(TblpresentationPeer::PR_ID,), $join_behavior);
				$c->addJoin(array(TblblogentryPeer::ENTRY_LINK,), array(TbldocumentPeer::DOC_ID,), $join_behavior);
				$c->addJoin(array(TblblogentryPeer::ENTRY_BLOG,), array(TblblogPeer::BL_ID,), $join_behavior);
				$c->addJoin(array(TblblogentryPeer::ENTRY_USER,), array(TbluserPeer::US_ID,), $join_behavior);

		$stmt = BasePeer::doSelect($c, $con);
		$results = array();

		while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
			$key1 = TblblogentryPeer::getPrimaryKeyHashFromRow($row, 0);
			if (null !== ($obj1 = TblblogentryPeer::getInstanceFromPool($key1))) {
															} else {
				$omClass = TblblogentryPeer::getOMClass();

				$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
				$obj1 = new $cls();
				$obj1->hydrate($row);
				TblblogentryPeer::addInstanceToPool($obj1, $key1);
			} 
				
				$key2 = TblpresentationPeer::getPrimaryKeyHashFromRow($row, $startcol2);
				if ($key2 !== null) {
					$obj2 = TblpresentationPeer::getInstanceFromPool($key2);
					if (!$obj2) {
	
						$omClass = TblpresentationPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj2 = new $cls();
					$obj2->hydrate($row, $startcol2);
					TblpresentationPeer::addInstanceToPool($obj2, $key2);
				} 
								$obj2->addTblblogentry($obj1);

			} 
				
				$key3 = TbldocumentPeer::getPrimaryKeyHashFromRow($row, $startcol3);
				if ($key3 !== null) {
					$obj3 = TbldocumentPeer::getInstanceFromPool($key3);
					if (!$obj3) {
	
						$omClass = TbldocumentPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj3 = new $cls();
					$obj3->hydrate($row, $startcol3);
					TbldocumentPeer::addInstanceToPool($obj3, $key3);
				} 
								$obj3->addTblblogentry($obj1);

			} 
				
				$key4 = TblblogPeer::getPrimaryKeyHashFromRow($row, $startcol4);
				if ($key4 !== null) {
					$obj4 = TblblogPeer::getInstanceFromPool($key4);
					if (!$obj4) {
	
						$omClass = TblblogPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj4 = new $cls();
					$obj4->hydrate($row, $startcol4);
					TblblogPeer::addInstanceToPool($obj4, $key4);
				} 
								$obj4->addTblblogentry($obj1);

			} 
				
				$key5 = TbluserPeer::getPrimaryKeyHashFromRow($row, $startcol5);
				if ($key5 !== null) {
					$obj5 = TbluserPeer::getInstanceFromPool($key5);
					if (!$obj5) {
	
						$omClass = TbluserPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj5 = new $cls();
					$obj5->hydrate($row, $startcol5);
					TbluserPeer::addInstanceToPool($obj5, $key5);
				} 
								$obj5->addTblblogentry($obj1);

			} 
			$results[] = $obj1;
		}
		$stmt->closeCursor();
		return $results;
	}


	
	public static function doSelectJoinAllExceptTblblog(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN)
	{
		$c = clone $c;

								if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		TblblogentryPeer::addSelectColumns($c);
		$startcol2 = (TblblogentryPeer::NUM_COLUMNS - TblblogentryPeer::NUM_LAZY_LOAD_COLUMNS);

		TblpresentationPeer::addSelectColumns($c);
		$startcol3 = $startcol2 + (TblpresentationPeer::NUM_COLUMNS - TblpresentationPeer::NUM_LAZY_LOAD_COLUMNS);

		TbldocumentPeer::addSelectColumns($c);
		$startcol4 = $startcol3 + (TbldocumentPeer::NUM_COLUMNS - TbldocumentPeer::NUM_LAZY_LOAD_COLUMNS);

		TblblogcategoryPeer::addSelectColumns($c);
		$startcol5 = $startcol4 + (TblblogcategoryPeer::NUM_COLUMNS - TblblogcategoryPeer::NUM_LAZY_LOAD_COLUMNS);

		TbluserPeer::addSelectColumns($c);
		$startcol6 = $startcol5 + (TbluserPeer::NUM_COLUMNS - TbluserPeer::NUM_LAZY_LOAD_COLUMNS);

				$c->addJoin(array(TblblogentryPeer::ENTRY_LINK,), array(TblpresentationPeer::PR_ID,), $join_behavior);
				$c->addJoin(array(TblblogentryPeer::ENTRY_LINK,), array(TbldocumentPeer::DOC_ID,), $join_behavior);
				$c->addJoin(array(TblblogentryPeer::ENTRY_CATEGORY,), array(TblblogcategoryPeer::CAT_ID,), $join_behavior);
				$c->addJoin(array(TblblogentryPeer::ENTRY_USER,), array(TbluserPeer::US_ID,), $join_behavior);

		$stmt = BasePeer::doSelect($c, $con);
		$results = array();

		while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
			$key1 = TblblogentryPeer::getPrimaryKeyHashFromRow($row, 0);
			if (null !== ($obj1 = TblblogentryPeer::getInstanceFromPool($key1))) {
															} else {
				$omClass = TblblogentryPeer::getOMClass();

				$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
				$obj1 = new $cls();
				$obj1->hydrate($row);
				TblblogentryPeer::addInstanceToPool($obj1, $key1);
			} 
				
				$key2 = TblpresentationPeer::getPrimaryKeyHashFromRow($row, $startcol2);
				if ($key2 !== null) {
					$obj2 = TblpresentationPeer::getInstanceFromPool($key2);
					if (!$obj2) {
	
						$omClass = TblpresentationPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj2 = new $cls();
					$obj2->hydrate($row, $startcol2);
					TblpresentationPeer::addInstanceToPool($obj2, $key2);
				} 
								$obj2->addTblblogentry($obj1);

			} 
				
				$key3 = TbldocumentPeer::getPrimaryKeyHashFromRow($row, $startcol3);
				if ($key3 !== null) {
					$obj3 = TbldocumentPeer::getInstanceFromPool($key3);
					if (!$obj3) {
	
						$omClass = TbldocumentPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj3 = new $cls();
					$obj3->hydrate($row, $startcol3);
					TbldocumentPeer::addInstanceToPool($obj3, $key3);
				} 
								$obj3->addTblblogentry($obj1);

			} 
				
				$key4 = TblblogcategoryPeer::getPrimaryKeyHashFromRow($row, $startcol4);
				if ($key4 !== null) {
					$obj4 = TblblogcategoryPeer::getInstanceFromPool($key4);
					if (!$obj4) {
	
						$omClass = TblblogcategoryPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj4 = new $cls();
					$obj4->hydrate($row, $startcol4);
					TblblogcategoryPeer::addInstanceToPool($obj4, $key4);
				} 
								$obj4->addTblblogentry($obj1);

			} 
				
				$key5 = TbluserPeer::getPrimaryKeyHashFromRow($row, $startcol5);
				if ($key5 !== null) {
					$obj5 = TbluserPeer::getInstanceFromPool($key5);
					if (!$obj5) {
	
						$omClass = TbluserPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj5 = new $cls();
					$obj5->hydrate($row, $startcol5);
					TbluserPeer::addInstanceToPool($obj5, $key5);
				} 
								$obj5->addTblblogentry($obj1);

			} 
			$results[] = $obj1;
		}
		$stmt->closeCursor();
		return $results;
	}


	
	public static function doSelectJoinAllExceptTbluser(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN)
	{
		$c = clone $c;

								if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		TblblogentryPeer::addSelectColumns($c);
		$startcol2 = (TblblogentryPeer::NUM_COLUMNS - TblblogentryPeer::NUM_LAZY_LOAD_COLUMNS);

		TblpresentationPeer::addSelectColumns($c);
		$startcol3 = $startcol2 + (TblpresentationPeer::NUM_COLUMNS - TblpresentationPeer::NUM_LAZY_LOAD_COLUMNS);

		TbldocumentPeer::addSelectColumns($c);
		$startcol4 = $startcol3 + (TbldocumentPeer::NUM_COLUMNS - TbldocumentPeer::NUM_LAZY_LOAD_COLUMNS);

		TblblogcategoryPeer::addSelectColumns($c);
		$startcol5 = $startcol4 + (TblblogcategoryPeer::NUM_COLUMNS - TblblogcategoryPeer::NUM_LAZY_LOAD_COLUMNS);

		TblblogPeer::addSelectColumns($c);
		$startcol6 = $startcol5 + (TblblogPeer::NUM_COLUMNS - TblblogPeer::NUM_LAZY_LOAD_COLUMNS);

				$c->addJoin(array(TblblogentryPeer::ENTRY_LINK,), array(TblpresentationPeer::PR_ID,), $join_behavior);
				$c->addJoin(array(TblblogentryPeer::ENTRY_LINK,), array(TbldocumentPeer::DOC_ID,), $join_behavior);
				$c->addJoin(array(TblblogentryPeer::ENTRY_CATEGORY,), array(TblblogcategoryPeer::CAT_ID,), $join_behavior);
				$c->addJoin(array(TblblogentryPeer::ENTRY_BLOG,), array(TblblogPeer::BL_ID,), $join_behavior);

		$stmt = BasePeer::doSelect($c, $con);
		$results = array();

		while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
			$key1 = TblblogentryPeer::getPrimaryKeyHashFromRow($row, 0);
			if (null !== ($obj1 = TblblogentryPeer::getInstanceFromPool($key1))) {
															} else {
				$omClass = TblblogentryPeer::getOMClass();

				$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
				$obj1 = new $cls();
				$obj1->hydrate($row);
				TblblogentryPeer::addInstanceToPool($obj1, $key1);
			} 
				
				$key2 = TblpresentationPeer::getPrimaryKeyHashFromRow($row, $startcol2);
				if ($key2 !== null) {
					$obj2 = TblpresentationPeer::getInstanceFromPool($key2);
					if (!$obj2) {
	
						$omClass = TblpresentationPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj2 = new $cls();
					$obj2->hydrate($row, $startcol2);
					TblpresentationPeer::addInstanceToPool($obj2, $key2);
				} 
								$obj2->addTblblogentry($obj1);

			} 
				
				$key3 = TbldocumentPeer::getPrimaryKeyHashFromRow($row, $startcol3);
				if ($key3 !== null) {
					$obj3 = TbldocumentPeer::getInstanceFromPool($key3);
					if (!$obj3) {
	
						$omClass = TbldocumentPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj3 = new $cls();
					$obj3->hydrate($row, $startcol3);
					TbldocumentPeer::addInstanceToPool($obj3, $key3);
				} 
								$obj3->addTblblogentry($obj1);

			} 
				
				$key4 = TblblogcategoryPeer::getPrimaryKeyHashFromRow($row, $startcol4);
				if ($key4 !== null) {
					$obj4 = TblblogcategoryPeer::getInstanceFromPool($key4);
					if (!$obj4) {
	
						$omClass = TblblogcategoryPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj4 = new $cls();
					$obj4->hydrate($row, $startcol4);
					TblblogcategoryPeer::addInstanceToPool($obj4, $key4);
				} 
								$obj4->addTblblogentry($obj1);

			} 
				
				$key5 = TblblogPeer::getPrimaryKeyHashFromRow($row, $startcol5);
				if ($key5 !== null) {
					$obj5 = TblblogPeer::getInstanceFromPool($key5);
					if (!$obj5) {
	
						$omClass = TblblogPeer::getOMClass();


					$cls = substr('.'.$omClass, strrpos('.'.$omClass, '.') + 1);
					$obj5 = new $cls();
					$obj5->hydrate($row, $startcol5);
					TblblogPeer::addInstanceToPool($obj5, $key5);
				} 
								$obj5->addTblblogentry($obj1);

			} 
			$results[] = $obj1;
		}
		$stmt->closeCursor();
		return $results;
	}

	
	public static function getTableMap()
	{
		return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
	}

	
	public static function getOMClass()
	{
		return TblblogentryPeer::CLASS_DEFAULT;
	}

	
	public static function doInsert($values, PropelPDO $con = null)
	{
		if ($con === null) {
			$con = Propel::getConnection(TblblogentryPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
		}

		if ($values instanceof Criteria) {
			$criteria = clone $values; 		} else {
			$criteria = $values->buildCriteria(); 		}

		if ($criteria->containsKey(TblblogentryPeer::ENTRY_ID) && $criteria->keyContainsValue(TblblogentryPeer::ENTRY_ID) ) {
			throw new PropelException('Cannot insert a value for auto-increment primary key ('.TblblogentryPeer::ENTRY_ID.')');
		}


				$criteria->setDbName(self::DATABASE_NAME);

		try {
									$con->beginTransaction();
			$pk = BasePeer::doInsert($criteria, $con);
			$con->commit();
		} catch(PropelException $e) {
			$con->rollBack();
			throw $e;
		}

		return $pk;
	}

	
	public static function doUpdate($values, PropelPDO $con = null)
	{
		if ($con === null) {
			$con = Propel::getConnection(TblblogentryPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
		}

		$selectCriteria = new Criteria(self::DATABASE_NAME);

		if ($values instanceof Criteria) {
			$criteria = clone $values; 
			$comparison = $criteria->getComparison(TblblogentryPeer::ENTRY_ID);
			$selectCriteria->add(TblblogentryPeer::ENTRY_ID, $criteria->remove(TblblogentryPeer::ENTRY_ID), $comparison);

		} else { 			$criteria = $values->buildCriteria(); 			$selectCriteria = $values->buildPkeyCriteria(); 		}

				$criteria->setDbName(self::DATABASE_NAME);

		return BasePeer::doUpdate($selectCriteria, $criteria, $con);
	}

	
	public static function doDeleteAll($con = null)
	{
		if ($con === null) {
			$con = Propel::getConnection(TblblogentryPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
		}
		$affectedRows = 0; 		try {
									$con->beginTransaction();
			$affectedRows += BasePeer::doDeleteAll(TblblogentryPeer::TABLE_NAME, $con);
			$con->commit();
			return $affectedRows;
		} catch (PropelException $e) {
			$con->rollBack();
			throw $e;
		}
	}

	
	 public static function doDelete($values, PropelPDO $con = null)
	 {
		if ($con === null) {
			$con = Propel::getConnection(TblblogentryPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
		}

		if ($values instanceof Criteria) {
												TblblogentryPeer::clearInstancePool();

						$criteria = clone $values;
		} elseif ($values instanceof Tblblogentry) {
						TblblogentryPeer::removeInstanceFromPool($values);
						$criteria = $values->buildPkeyCriteria();
		} else {
			


			$criteria = new Criteria(self::DATABASE_NAME);
			$criteria->add(TblblogentryPeer::ENTRY_ID, (array) $values, Criteria::IN);

			foreach ((array) $values as $singleval) {
								TblblogentryPeer::removeInstanceFromPool($singleval);
			}
		}

				$criteria->setDbName(self::DATABASE_NAME);

		$affectedRows = 0; 
		try {
									$con->beginTransaction();
			
			$affectedRows += BasePeer::doDelete($criteria, $con);

			$con->commit();
			return $affectedRows;
		} catch (PropelException $e) {
			$con->rollBack();
			throw $e;
		}
	}

	
	public static function doValidate(Tblblogentry $obj, $cols = null)
	{
		$columns = array();

		if ($cols) {
			$dbMap = Propel::getDatabaseMap(TblblogentryPeer::DATABASE_NAME);
			$tableMap = $dbMap->getTable(TblblogentryPeer::TABLE_NAME);

			if (! is_array($cols)) {
				$cols = array($cols);
			}

			foreach ($cols as $colName) {
				if ($tableMap->containsColumn($colName)) {
					$get = 'get' . $tableMap->getColumn($colName)->getPhpName();
					$columns[$colName] = $obj->$get();
				}
			}
		} else {

		}

		$res =  BasePeer::doValidate(TblblogentryPeer::DATABASE_NAME, TblblogentryPeer::TABLE_NAME, $columns);
    if ($res !== true) {
        $request = sfContext::getInstance()->getRequest();
        foreach ($res as $failed) {
            $col = TblblogentryPeer::translateFieldname($failed->getColumn(), BasePeer::TYPE_COLNAME, BasePeer::TYPE_PHPNAME);
            $request->setError($col, $failed->getMessage());
        }
    }

    return $res;
	}

	
	public static function retrieveByPK($pk, PropelPDO $con = null)
	{

		if (null !== ($obj = TblblogentryPeer::getInstanceFromPool((string) $pk))) {
			return $obj;
		}

		if ($con === null) {
			$con = Propel::getConnection(TblblogentryPeer::DATABASE_NAME, Propel::CONNECTION_READ);
		}

		$criteria = new Criteria(TblblogentryPeer::DATABASE_NAME);
		$criteria->add(TblblogentryPeer::ENTRY_ID, $pk);

		$v = TblblogentryPeer::doSelect($criteria, $con);

		return !empty($v) > 0 ? $v[0] : null;
	}

	
	public static function retrieveByPKs($pks, PropelPDO $con = null)
	{
		if ($con === null) {
			$con = Propel::getConnection(TblblogentryPeer::DATABASE_NAME, Propel::CONNECTION_READ);
		}

		$objs = null;
		if (empty($pks)) {
			$objs = array();
		} else {
			$criteria = new Criteria(TblblogentryPeer::DATABASE_NAME);
			$criteria->add(TblblogentryPeer::ENTRY_ID, $pks, Criteria::IN);
			$objs = TblblogentryPeer::doSelect($criteria, $con);
		}
		return $objs;
	}

} 

Propel::getDatabaseMap(BaseTblblogentryPeer::DATABASE_NAME)->addTableBuilder(BaseTblblogentryPeer::TABLE_NAME, BaseTblblogentryPeer::getMapBuilder());

